behavior
Queries the build data of a behavior profile stored on the Control Node. You can specify a date range to retrieve data for a specific period.
Command properties
| Item | Description |
|---|---|
| Command type | Driver query |
| Required permission | Logged-in user (profile owner, shared target, or administrator) |
| License usage | Not counted |
| Parallel execution | Not supported |
| Distributed execution | Not supported |
Syntax
In the syntax above, name is available starting with 4.0.2609.0.
Options
guid=STR- Behavior profile GUID. In the 5.0 series (through 5.0.2605.2), this is the only way to specify the target. In the 4.0 series (4.0.2609.0 and later), this option cannot be used together with
name, and you must specify eitherguidorname. name=STR- Behavior profile name (cannot be used together with
guid). You must specify either theguidornameoption. This option is available starting with 4.0.2609.0. from=DATE- Start time of the query range. Specify in
yyyyMMddHHmmssformat. If omitted, the query starts from the beginning of the available data. to=DATE- End time of the query range. Specify in
yyyyMMddHHmmssformat. If omitted, the query runs to the end of the available data.
Output fields
The output fields are the result fields from the behavior profile's build query. The exact fields depend on each profile's build query.
Error codes
Parse errors
| Error code | Message | Description |
|---|---|---|
| 300101 | Invalid sonar session. | The session is not valid. |
| 300102 | from option should be yyyyMMddHHmmss format | The from option value is not in the correct date format. |
| 300103 | to option should be yyyyMMddHHmmss format | The to option value is not in the correct date format. |
| 300104 | unknown behavior profile | No behavior profile exists for the specified GUID. |
| 300105 | Invalid GUID format. | The guid option value is not a valid GUID format. |
| 300106 | No permission. | You do not have access permission for the behavior profile. |
| 300118 | Specify 'guid' option in the behavior command. | The guid option is not specified. The error code differs by series — the 5.0 series (through 5.0.2605.2) reports 300118; the 4.0 series (4.0.2609.0 and later) reports 300185 instead. |
| 300185 | Specify 'guid' or 'name' option in the behavior command. | Neither the guid nor the name option is specified. Available starting with 4.0.2609.0, which has the name option. |
| 300186 | Behavior profile not found by name. | No behavior profile exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option. |
| 300187 | Duplicate behavior profile name. | More than one behavior profile exists with the name specified in the name option. Available starting with 4.0.2609.0, which has the name option. |
| 300188 | Specify only one of 'guid' or 'name' option in the behavior command. | Both the guid and name options are specified. Available starting with 4.0.2609.0, which has the name option. |
Runtime errors
N/A
Description
The behavior command retrieves the build result data of a behavior profile stored on the Control Node. If the behavior profile has not been built yet, no results are returned.
Use the guid option to specify which behavior profile to query. In the 4.0 series (4.0.2609.0 and later), you can also use the name option; the command looks up the profile by that name to resolve its GUID, and specifying both guid and name, or omitting both, causes an error, as does specifying a name that does not exist or that matches more than one profile.
Use the from and to options to specify a date range and retrieve data only for that period. The date format is yyyyMMddHHmmss.
Only the profile owner, users with whom the profile is shared, or administrators can run this command. Accessing a profile belonging to another tenant requires cluster administrator privileges.
Examples
-
Querying all data from a behavior profile
behavior guid=550e8400-e29b-41d4-a716-446655440000Retrieves all available build data for the behavior profile with the specified GUID.
-
Querying data for a specific date range
behavior guid=550e8400-e29b-41d4-a716-446655440000 from=20260101000000 to=20260317235959Retrieves behavior profile build data from January 1, 2026 to March 17, 2026.
-
Querying data from a specific start time
behavior guid=550e8400-e29b-41d4-a716-446655440000 from=20260301000000Retrieves behavior profile build data from March 1, 2026 onward.
-
Specifying a behavior profile by name (4.0 series, 4.0.2609.0 and later)
behavior name=web_attacker_profileRetrieves build data for the behavior profile by name instead of GUID.
Change history
| Target | Introduced in |
|---|---|
The behavior command | 4.0.2305.0 |
The name option | 4.0.2609.0 |