counters

Build 1501 on 14/Nov/2017  This topic last edited on: 22/Mar/2016, at 16:27

counters [-<option> . . .]

Extracts counters information.

Options

[-ids] <comma-separated database ids>

Database ids of the objects to consider. Optional, if not specified the global (i.e. not specific to particular objects) counters are used.

-counter <string>

Name of the counter to consider. Optional, if not specified all the available counters are used.

-interval <counter time interval>

Time interval to use. Optional, if not specified the total numbers (i.e.not specific to a time interval) are used.

-out <string>

Output file name

-from <date/time>

Start time and date - meaningful only if an interval has been specified. Optional, if not specified the data starts with the oldest available value.

-to <date/time>

End time and date - meaningful only if an interval has been specified. Optional, if not specified the data ends with the most recent available value.

-username <string>

The optional user name to use to login into the system. If not specified the Web service login is used. Ignored in interactive mode.

-password <string>

The user password to use to login into the system. Ignored if no system user name is specified. Ignored in interactive mode.

-lang <string>

User-interface language, e.g. 'en-US' for English, US version. Ignored in interactive mode.

-srvname <string>

The name of the Web service connection parameters to use, as defined in the user configuration file (USERCONFIG.XML file, typically stored in C:\Users\<yourWindowsname>\AppData\Roaming\TeraDP\GN4\ on Windows 10 / 8 / 7 / Vista and in c:\Documents and Settings\<user name>\Application Data on Windows XP / Server 2003). If not specified the first connection in the configuration file is used. Ignored in interactive mode.

Notes:

When using this parameter, have in mind that there is no way to ensure that the same name in the USERCONFIG.XML file gets used coherently on all network computers. Therefore, this is not a safe method unless you are using it only on well known computers.

Use either -srvname or -srvurl, but not both.

-srvurl <string>

The URL of Web service to connect to, e.g. http://myhost.com/GN4/Adminsrv.asmx. Ignored in interactive mode.

Notes:

When using this parameter, have in mind that it is independent of the USERCONFIG.XML settings, therefore, much safer.

Use either -srvname or -srvurl, but not both.

-srvusername <string>

The Windows user name to use to login to the Web service. If not specified the current Windows login is used, and the password and domain options are ignored. Ignored in interactive mode.

-srvpassword <string>

The Windows user password to use to login to the Web service. Ignored ininteractive mode.

-srvdomain <string>

The domain of the user to use to login to the Web service. Ignored in interactive mode.

-srvpassphrase <string>

Pass-phrase used to encrypt/decrypt data transferred to and from the server. Ignored in interactive mode.

Examples

To get the data of a specific counter:

cmd4 counters -out c.xml -counter <counter name>

All the counters for one or more objects:

cmd4 counters -out c.xml -ids <object id 1>,<object id 2>...

All the global (non object-specific) counters:

cmd4 counters -out c.xml

The previous example extract just the total value for the counters, but it is possible to get also the data for a specific time-interval, e.g.

cmd4 counters -out c.xml -counter <counter name> -interval HourVal

gets all the data of the specified counter in hour interval.

When there is a specified time-interval it is possible to restrict the date-time that is returned:

cmd4 counters -out c.xml -counter <counter name> -interval DayVal 

-from 2008-01-01T00:00:00 -to 2008-06-01T00:00:00

gets all the data of the specific counter for all the days between Jan. 1 2008 to June 1 2008 (both included)

See also other exports commands

auditExtracts audit trail information and objects old versions.
clientgetGets one or more objects transferring their content to the client machine and optionally checking them out.
clientrevertGets one or more objects transferring their content to the client machine and removing their persistent check out status. Client files are made read-only.
configImports and exports configuration data.
exportExports data from database in XML format.
getGets (reads) objects.
iconImports and exports icons.
keywordsImports, exports or removes keywords.
logindataExtracts the content of gn_LoginTable as XML.
stringsImports, exports or removes translation strings.
tasksExtracts the list of the pending scheduled tasks matching the specified conditions.
taskslogExtracts the list of the log of executed tasks matching the specified conditions.