Some function calls are widely used in PSL scripts, but are stubbed out (the function executes but does not return any data, because all the components for the script are not present) when you execute the PSL script from a command line using "psl" or "PatrolCli". This causes some scripts to fail when executed as standalone scripts.
The following table lists the conditions that are returned for each function when executed from the command line.
Conditions when Functions are Executed from the Command Line
| |
---|
F: Fully implemented (both Agent and standalone) | _snmp_debug() acos() asctime() asin() atan() atexit() batch_set() can_code_cvt() cat() ceil() close() code_cvt() convert_base() convert_date() convert_locale_date() cos() cosh() date() dcget_text() dget_text() difference() exists() exp() fabs() findRowNumber() floor() fmod() fseek() ftell() get_chan_info() g et_text() get_vars() gethostinfo() getpid() | getpname() grep() index() int() intersection() is_var() isnumber() join() length() lines() log10() loge() matchline() msg_check() msg_get_format() msg_get_option() msg_get_severity() msg_printf() msg_sprintf() ntharg() nthargf() nthline() nthlinef() num_bytes() poplines() pow() print() printf() proc_exists() ProfDefaultOptions() ProfGet() ProfGetTotalCpu() ProfOptions() ProfReset() | ProfTop() PslFunctionCall() PslFunctionExists() PslSetOptions() random() replace() rindex() sin() sinh() sleep() sort() splitline() sprintf() sqrt() srandom() str_repeat() strcasecmp() subset() substr() tail() tan() tanh() text_domain() time() tmpnam() tolower() toupper() trim() union() unique() va_arg() va_start() |
A: Agent only implementation; stubbed out in standalone | snmp_get() snmp_get_next() snmp_h_get() snmp_h_get_next() snmp_h_set() snmp_open() snmp_set() snmp_trap_ignore() snmp_trap_listen() snmp_trap_raise_std_trap() | snmp_trap_receive() snmp_trap_register_im() snmp_trap_send() snmp_walk() sopen() system() write_to_report() writeLog() writeLogCat() | |
L: Agent implementation; limited standalone | chan_exists() cond_signal() cond_wait() debugger() destroy_lock() execute() file() fopen() get() getenv() history() | lock() lock_info() PslExecute() read() readln() remove() set() trace_psl_process() unlock() unset() write() | |
X: Removed functionality; no longer supported | closeConsumerInstance() closeMetric() closeMetricGroup() disableMetric() dumpMetricStructures() enableMetric() enableMetricGroup() getMetricComputation() getMetricValue() getRowCount() | openConsumerInstance() openMetric() openMetricGroup() queryMetricComputations() queryMetricGroups() queryMetrics() setMetricComputation() updateConsumerInstance() updateMetricGroup() | |
Where to go from here
PSL-Built-in-Functions