Privileges required for execution
[Windows]
The privileges of a user belonging to the "Administrators" group are required to execute this command.
[UNIX]
The privileges of a system administrator (superuser) are required to execute this command.
Execution environment
This command can be executed on Managers, Enterprise Managers and operation management clients.
Syntax
[Windows]
<Installation directory>\bin\sqcPDBcout.exe -R record-id [-sys system] [-rid resource-id] [-tmbin time] [-tmfin time] [-intval interval] [-lcltm on|off] [-h on|off] |
<Installation directory>\bin\sqcPDBcout.exe -f sql-file [-h on|off] |
[UNIX]
/opt/FJSVssqc/bin/sqcPDBcout.sh -R record-id [-sys system] [-rid resource-id] [-tmbin time] [-tmfin time] [-intval interval] [-lcltm on|off] [-h on|off] |
/opt/FJSVssqc/bin/sqcPDBcout.sh -f sql-file [-h on|off] |
<Installation directory>\bin\sqcPDBcout.exe -R record-id -name manager [-sys system] [-rid resource-id] [-tmbin time] [-tmfin time] [-intval interval] [-lcltm on|off] [-h on|off] |
<Installation directory>\bin\sqcPDBcout.exe -f sql-file -name manager [-h on|off] |
Function
This command outputs data stored in a PDB (Summary information or Report information) to CSV format. The command is executed with parameters that specify the conditions to use when extracting information.
Note
Do not execute multiple sqcPDBcout command simultaneously.
Options
This mode specifies data extraction conditions as options. Specify the record ID in "record-id". Refer to "Chapter 4 Data Formats" for details on record IDs.
This mode specifies data extraction conditions in SQL. Specify the path to a file containing SQL in "sql-file".
Refer to the following usage example for details on the syntax for SQL statements. Also, refer to "Chapter 4 Data Formats" for details on table names specified with the FROM clause.
Refer to the following output results for details on field names specified with the SELECT and WHERE clauses.
Note
Do not include linefeed code in the middle of the SQL statements.
Only FROM clause and WHERE clause can be used in the SELECT statement.
This mode specifies a Manager. Specify in "manager" the host name of a Manager that has the PDB data to be output.
Specify the name of the system for which data is to be extracted. If this option is omitted, the data of all systems will be targeted.
Specify the ID of the resource for which data is to be extracted. If this option is omitted, the data of all resources will be targeted.
Specify the extraction start time using GMT (Greenwich Mean Time) or local time according to -lcltm option. If this option is omitted, all the data in the PDB, from the oldest to the newest, will be extracted.
The following format is used to specify the time:
"YYYY-MM-DD hh:mm:ss" (YYYY: year; MM: month; DD: day; hh: hour; mm: minute; ss: second)
Specify the extraction end time using GMT (Greenwich Mean Time) or the local time according to -lcltm option. If this option is omitted, all the data in the PDB, from the newest to the oldest, will be extracted.
The following format is used to specify the time:
"YYYY-MM-DD hh:mm:ss" (YYYY: year; MM: month; DD: day; hh: hour; mm: minute; ss: second)
Specify whether to display header information at the beginning of the output result. If this option is omitted, header information is not displayed.
This option specifies whether the local time is to be used in the extraction start and end times specified by the -tmbin and -tmfin options, and in the time in the data that is output in CSV format. If this option is omitted, GMT (Greenwich Mean Time) will be used.
The time zone set in the machine that executes the sqcPDBcout command is set as the local time.
Note that if "86400" (data for one day) is specified in the -intval option and this option is set to "on", data dated "YYYY-MM-DD 00:00:00" Greenwich Mean Time will be converted to the local time before being displayed.
Specify whether to display header information at the beginning of the output result. If this option is omitted, header information is not displayed.
Execution results/Output format
When header information is attached to the beginning of output results, information such as the following will be displayed.
For Summary information:
system_name,record_id,resource_id,start_date_time,end_date_time,end_time,data_num1, data_num2,data_num3,data_num4,data_num5,data_num6,data_num7,data_text1 |
For Drilled-Down/Report information:
system_name,record_id,resource_id,start_date_time,end_date_time,consol_flag,consol_interval, coverage,data_num1,data_num2,data_num3,data_num4,data_num5,data_num6,data_num7,data_text1, data_text2,data_text3,data_text4,data_text5 |
The items that appear in header information are explained below.
The system name
The record ID. Refer to "Chapter 4 Data Formats" for details.
The resource ID
The collection start time using GMT (Greenwich Mean Time)
The collection end time using GMT (Greenwich Mean Time)
The time component of the collection end time
Internal control information
Internal control information
Internal control information
Internal control information
The interval type
The interval time
The data coverage rate. For example, a coverage rate of 1 indicates no lost data. A coverage rate of 0.9 indicates that 10% of data has been lost.
The numerical value of each field. Refer to "Chapter 4 Data Formats" for details.
The text of each field. Refer to "Chapter 4 Data Formats" for details.
Return values
0 : Normal termination
> 0 : Abnormal termination (error details are as follows)
PDB lock error
This error occurs if a contention occurs between the sqcPDBcout command and another process, such as a process that writes information collected by an Agent or Proxy Manager to the PDB, or a process that performs a PDB maintenance operation at 2:00 AM every day.
If this error occurs, keep executing the sqcPDBcout command until it terminates normally. Note, however, that if the PDB lock remains in effect for a long time during the time frame that the PDB maintenance process is executed, adjust the timing of the sqcPDBcout command so that it does not coincide with the timing of the PDB maintenance process.
Manager communication error
This error occurs when communication with a Manager fails. If this error occurs, check whether the Manager is running correctly. If the Manager is stopped, start it before executing this command.
Other error
Other errors can be caused by factors such as incorrectly specified options and problems with the environment. If an error occurs, review the option details and the execution environment.
Usage example 1
The following execution example uses the option specification (-R) as an extraction condition.
[Windows]
C:\>cd C:\Program Files\SystemwalkerSQC\bin C:\Program Files\SystemwalkerSQC\bin>sqcPDBcout -R WIN_DISKSPACE -sys LABRET -rid C:\ -tmbin "2004-07-01 10:00:00" -intval 3600 -h off LABRET,WIN_DISKSPACE,C:\,2004-07-01 11:00:00,2004-07-01 12:00:00,2,3600,1,74857984,2113864192,,,,,,,,,, LABRET,WIN_DISKSPACE,C:\,2004-07-01 12:00:00,2004-07-01 13:00:00,2,3600,1,105043456,2113864192,,,,,,,,,, End. |
[UNIX]
# cd /opt/FJSVssqc/bin/ # ./sqcPDBcout.sh -R WIN_DISKSPACE -sys LABRET -rid C:\ -tmbin "2004-07-01 10:00:00" -intval 3600 -h off LABRET,WIN_DISKSPACE,C:\,2004-07-01 11:00:00,2004-07-01 12:00:00,2,3600,1,74857984,2113864192,,,,,,,,,, LABRET,WIN_DISKSPACE,C:\,2004-07-01 12:00:00,2004-07-01 13:00:00,2,3600,1,105043456,2113864192,,,,,,,,,, End. |
Usage example 2
The following execution example uses the SQL file specification (-f) as an extraction condition.
[Windows]
C:\>cd C:\Program Files\SystemwalkerSQC\bin C:\Program Files\SystemwalkerSQC\bin>sqcPDBcout -f C:\sql.txt LABRET,WIN_DISKSPACE,C:\,2004-07-01 11:00:00,2004-07-01 12:00:00,2,3600,1,74857984,2113864192,,,,,,,,,, LABRET,WIN_DISKSPACE,C:\,2004-07-01 12:00:00,2004-07-01 13:00:00,2,3600,1,105043456,2113864192,,,,,,,,,, End. |
[UNIX]
# cd /opt/FJSVssqc/bin/ # ./sqcPDBcout.sh -f /tmp/sql.txt LABRET,WIN_DISKSPACE,C:\,2004-07-01 11:00:00,2004-07-01 12:00:00,2,3600,1,74857984,2113864192,,,,,,,,,, LABRET,WIN_DISKSPACE,C:\,2004-07-01 12:00:00,2004-07-01 13:00:00,2,3600,1,105043456,2113864192,,,,,,,,,, End. |
In this case, the content of sql.txt is as follows. There is no linefeed code in the middle of the actual SQL statement.
select * from resource_data where record_id='WIN_DISKSPACE' AND system_name='LABRET' AND consol_interval=3600; |