vs-cpu-vsx_redirect-to-file.txt.ind (51.6 KB)
vs-cpu-vsx_screen_log.txt.ind (42.7 KB)
[EDIT: added correct screen log file]
(note: rename attachments to .txt)
Trying to debug in command-runner full-command mode with --verbose. No output from writeDebug(). I’ve been seeing this issue for a while, but it’s a real problem for me now trying to develop a complicated script. What’s odd is that if I redirect the command output to a file (>), the output looks right.
Script below, screen output and redirected output attached.
#! META
name: chkp-gaia-vs-cpu-vsx
description: Records the CPU usage for virtual systems
type: monitoring
monitoring_interval: 1 minute
requires:
    vendor: "checkpoint"
    os.name: "gaia"
    vsx: "true"
    role-firewall: "true"
#! COMMENTS
vs-cpu-usage:
    why: |
        High CPU could cause traffic to be dropped, and may result in a notable performance issue.
    how: |
        indeni checks CPU usage each of the the VS processes.
    without-indeni: |
        An administrator could log in and manually check CPU usage.
    can-with-snmp: true
    can-with-syslog: false
    vendor-provided-management: |
        CPU utilization is not available for virtual systems, except via CLI or SNMP. It is possible to also get this in SmartView Monitor but it is off by default.
#! REMOTE::SSH
ps -e -o pid,comm | grep _dev
#! PARSER::AWK
{
    writeDebug($0)
}