Trying to run xsos -FSx on a live system fails because both modules unconditionally look for sosreport files:
# xsos -FSx
SS CHECK
Sessions:
Proto Local Peer sock_drop app_limited dsack_dups lost reord_seen back_log retrans_total rq tq %CPU %MEM User Command
----- ----- ---- --------- ----------- ---------- ---- ---------- -------- ------------- -- -- ---- ---- ---- -------
FIREWALL
Services enabled:
No firewall services enabled.
Rules loaded:
No rules loaded.
cat: /ps: No such file or directory
cat: /ps: No such file or directory
cat: /ps: No such file or directory
cat: /ps: No such file or directory
cat: /sos_commands/networking/ss_-peaonmi: No such file or directory
/usr/local/bin/xsos: line 3760: /sos_commands/systemd/systemctl_status_--all: No such file or directory
/usr/local/bin/xsos: line 3760: /sos_commands/systemd/systemctl_status_--all: No such file or directory
/usr/local/bin/xsos: line 3760: /sos_commands/systemd/systemctl_status_--all: No such file or directory
Looking at the relevant source, the code for handling a live system is missing (using SSCHECK as an example, FIREWALL has the same issue):
|
# These are used later to print the name, cpu and mem of the process owner of the socket. |
|
pids=$(cat $1/ps | tr -d '()[]' | tr -s ' ' | cut -d' ' -f2) |
|
cmds=$(cat $1/ps | tr -d '()[]' | tr -s ' ' | cut -d' ' -f11) |
|
cpus=$(cat $1/ps | tr -d '()[]' | tr -s ' ' | cut -d' ' -f3) |
|
mems=$(cat $1/ps | tr -d '()[]' | tr -s ' ' | cut -d' ' -f4) |
|
|
|
# These fields have format "name value". Add them a ":" so they have the same format as the other fields (name: value) |
|
cat "$1/sos_commands/networking/ss_-peaonmi" | sed \ |
|
-e 's/ send / send:/' \ |
|
-e 's/ pacing_rate / pacing_rate:/' \ |
|
-e 's/ delivered / delivered:/' \ |
|
-e 's/ delivery_rate / delivery_rate:/' | |
|
|
|
gawk -vpid_list="$pids" -vcmd_list="$cmds" -vmem_list="$mems" -vcpu_list="$cpus" \ |
|
-vcheck_fields_str="${XSOS_SS_CHECK_FIELDS}" \ |
|
-vI="$XSOS_INDENT_H1" -vcH1="${c[H1]}" -vcH2="${c[H2]}" -vcH3="${c[H3]}" -vc0="${c[0]}" ' |
Trying to run
xsos -FSxon a live system fails because both modules unconditionally look for sosreport files:Looking at the relevant source, the code for handling a live system is missing (using
SSCHECKas an example,FIREWALLhas the same issue):xsos/xsos
Lines 3415 to 3430 in 81e7575