jhist
displays historical information about Process Manager Server, calendars, flow definitions, flows, and jobs.
Synopsis
jhist -C category[,category,...] [-o operator_user_name|-o all] [-u user_name|-u all] [-c calendar_name] [-f flow_name] [-i flow_ID ] [-j job_name] [-t start_time,end_time] jhist [-h|-V]Description
You use the jhist command to display historical information about the specified object, such as a calendar, job, or flow. You can display information about a single type of work item or multiple types of work items, for a single user or for all users.
If you do not specify a user name, jhist displays information for the user who invoked the command. If you do not specify a time interval, jhist displays information for the past 7 days, starting at the time the jhist command was invoked.
If your Process Manager client and server are on separate hosts, the number of history records retrieved is limited to 1500 records by default. If the limit is reached, only the first (oldest) 1500 are retrieved. This limit is configurable with the parameter JS_HISTORY_LIMIT in js.conf.
Process Manager searches the diretory JS_HOME/work/history/ for history logs.
If JS_HISTORY_ARCHIVE_DIR is defined in js.conf, you can view archived history logs by running jhist from the Process Manager server host: Process Manager searches both JS_HOME/work/history/ and JS_HISTORY_ARCHIVE_DIR for history logs. When jhist is run from a host that is not the Process Manager server host, Process Manager only searches JS_HOME/work/history/ for history logs.
Options
- -C category
Specifies the type of object for which you want to see history. Choose from the following values:
-
alarm-displays historical information about one or more alarms
-
calendar-displays historical information about one or more calendars
-
daemon-displays historical information about the Process Manager Server
-
flowdef-displays historical information about one or more flow definitions
-
flow-displays historical information about one or more flows
-
job-displays historical information about one or more jobs or job arrays
You can specify more than one category by separating categories with a comma (,).
- -u user_name
-
Displays information about categories owned by the specified user. If you do not specify a user name, user name defaults to the user who invoked this command. If you specify -u all, information is displayed about flows owned by all users.
- -o operator_user_name | -o all
-
Only applies to the following categories: flowdef, flow, calendar.
Displays only information about flows, flow definitions, or calendars that the specified user has operated on. If you do not specify a user name, user name defaults to the user who invoked this command. If you specify -o all, displays information about all flow definitions, flows, or calendars that all users have operated on.
- -t start_time,end_time
-
Specifies the span of time for which you want to display the history. If you do not specify a start time, the start time is assumed to be 7 days prior to the time the jhist command is issued. If you do not specify an end time, the end time is assumed to be now.
- -c calendar_name
-
Specifies the name of the calendar for which to display historical information. If you do not specify a calendar name when displaying calendars, information is displayed for all calendars owned by the specified user.
- -f flow_name
-
Specifies the name of the flow definition for which to display historical information. Displays flow definition, flow, or job information for flow definitions with the specified name.
- -i flow_ID
-
Specifies the ID of the flow for which to display historical information. Displays flow and job information for flows with the specified ID.
- -j job_name
-
Specifies the name of the job, job array or alarm to display historical information about. Displays information about the job, job array or alarm with the specified name.
- -h
-
Prints the command usage to stderr and exits.
- -V
-
Prints the Process Manager release version to stderr and exits.
Usage
- -C alarm
Displays the time when the alarm was raised and the type and description of the alarm.
- -C calendar
Displays the times when calendars are added or deleted.
- -C daemon
Displays the server startup and shutdown times. These values are only displayed when root invokes jhist or the -u root option is used.
- -C flowdef
Displays information about when a flow definition state is:
-
Submit-When a flow definition is submitted
-
SubmitAndRun-When a flow runs immediately
-
Remove-When a flow definition is removed from the system
-
Release-When a flow definition is released from on hold
-
Hold-When a flow definition is placed on hold
-
Trigger-When a flow definition is triggered manually or by an event
-
Instantiate-When a flow is created
- -C flow
-
Displays information about when a flow state is:
-
Start-When a flow is started
-
Kill-When a flow is killed
-
Suspend-When a flow is suspended
-
Resume-When a flow is resumed from the Suspended state
-
Finished-When a flow is completed
- -C job
-
Displays information about when a job or job array is:
-
Started
-
Killed
-
Suspended
-
Resumed
-
Finished
Time interval format
You use the time interval to define a start and end time for collecting the data to be retrieved and displayed. Although you can specify both a start and an end time, you can also let one of the values default. You can specify either of the times as an absolute time, by specifying the date or time, or you can specify them relative to the current time.
Specify the time interval is follows:
start_time,end_time|start_time,|,end_time|start_time
Specify start_time or end_time in the following format:
[year/][month/][day][/hour:minute|/hour:]|.|.-relative_int
Where:
year is a four-digit number representing the calendar year.
month is a number from 1 to 12, where 1 is January and 12 is December.
day is a number from 1 to 31, representing the day of the month.
hour is an integer from 0 to 23, representing the hour of the day on a 24-hour clock.
minute is an integer from 0 to 59, representing the minute of the hour.
. (period) represents the current month/day/hour:minute.
.-relative_int is a number, from 1 to 31, specifying a relative start or end time prior to now.
- start_time,end_time
Specifies both the start and end times of the interval.
- start_time,
Specifies a start time, and lets the end time default to now.
- ,end_time
Specifies to start with the first logged occurrence, and end at the time specified.
- start_time
Starts at the beginning of the most specific time period specified, and ends at the maximum value of the time period specified. For example, 3/ specifies the month of March-start March 1 at 00:00 a.m. and end at the last possible minute in March: March 31st at midnight.
Absolute time examples
Assume the current time is May 9 17:06 2005:
1,8 = May 1 00:00 2005 to May 8 23:59 2005
,4 = the time of the first occurrence to May 4 23:59 2005
6 = May 6 00:00 2005 to May 6 23:59 2005
3/ = Mar 1 00:00 2005 to Mar 31 23:59 2005
/12: = May 9 12:00 2005 to May 9 12:59 2005
2/1 = Feb 1 00:00 2005 to Feb 1 23:59 2005
2/1, = Feb 1 00:00 to the current time
,. = the time of the first occurrence to the current time
,2/10: = the time of the first occurrence to May 2 10:59 2005
2001/12/31,2005/5/1 = from Dec 31, 2001 00:00:00 to May 1st 2005 23:59:59
Relative time examples
.-9, = April 30 17:06 2005 to the current time
,.-2/ = the time of the first occurrence to Mar 7 17:06 2005
.-9,.-2 = nine days ago to two days ago (April 30, 2005 17:06 to May 7, 2005 17:06)
Examples
Display information about the calendar mycalendar and all flows for user1:
jhist -C calendar,flow -u user1 -c mycalendar
Display information about the daemon and calendar for the past 30 days:
jhist -C calendar,daemon -t .-30,. -u all
Display information for all flows with the name flow1, for user1 in the past week (counting 7 days back from today):
jhist -C flow -u user1 -f flow1 -t .-7,.
Display information for all flows with the ID 231 for the past 3 days:
jhist -C flow -i 231 -t .-3,.
Display information for all flows with the ID 231 and all related jobs from March 25, 2005 to March 31, 2005:
jhist -C flow,job -i 231 -t 2005/3/25,2005/3/31
Display information for all flows with the ID 101 and all related jobs with the name myjob:
jhist -C flow,job -i 101 -j myjob
Display information for all flows associated with the flow definition myflow and flows dated later than January 31, 2005
jhist -C flowdef,flow -f myflow 2005/1/31,.
Display information for all flows associated with the flow definition myflow and that userA can operate on
jhist -C flowdef,flow -f myflow -o userA