phosphor logging

Vernon Mauery vernon.mauery at linux.intel.com
Thu Dec 5 07:57:06 AEDT 2019


On 27-Nov-2019 05:08 AM, Devender Rao wrote:
>try "journalctl -o json-pretty > /tmp/logfile" and in the log file search for "
>HASSIS_REQUESTED_POWER_STATE"

I created a little script because I wanted to see all the stuff getting 
logged in ipmi land. This could be generalized, but maybe not automated 
for any set of repos.

This script creates a script that can then be run on the BMC, and only 
prints the fields you care about rather than all the fields from 
verbose printing.

--Vernon

======================8<----------------------
#!/bin/sh

cat <<EOF
#!/bin/sh
F=MESSAGE,SYSLOG_IDENTIFIER
EOF
for P in phosphor-host-ipmid phosphor-net-ipmid kcsbridge; do
        (
                cd $P
                # find entry("<F>") and split them out
                git grep '\<entry("' | sed 's/\(\<entry("[^)]*\)/\1\n/g' |
                        grep 'entry' | sed 's/.*entry("\([-_A-Z0-9]*\).*/F=$F,\1/ig'
        )
done | sort | uniq
cat <<EOF
T="-t ipmid"
T="\$T -t netipmid -t netipmid-eth0 -t netipmid-eth1"
T="\$T -t kcsbridged -t kcsbridged-ipmi-kcs3 -t kcsbridged-ipmi-kcs4"

journalctl -f -o verbose -p 7 \$T --output-fields=\$F | \\
        sed 's/\(^[^\s].*UTC\).*/\1/'
EOF


More information about the openbmc mailing list