Skip to content

Commit

Permalink
timeout on commands
Browse files Browse the repository at this point in the history
  • Loading branch information
harp-intel committed Dec 9, 2024
1 parent 8d60a47 commit d22d05f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions internal/script/script_defs.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ rdmsr 0x2FFE`, // uncore client cha count, uncore cha count, uncore cha count sp
},
{
Name: LshwScriptName,
Script: "lshw -businfo -numeric",
Script: "timeout 30 lshw -businfo -numeric",
Depends: []string{"lshw"},
Superuser: true,
},
Expand All @@ -488,7 +488,7 @@ rdmsr 0x2FFE`, // uncore client cha count, uncore cha count, uncore cha count sp
},
{
Name: NicInfoScriptName,
Script: `lshw -businfo -numeric | grep -E "^(pci|usb).*? \S+\s+network\s+\S.*?" \
Script: `timeout 30 lshw -businfo -numeric | grep -E "^(pci|usb).*? \S+\s+network\s+\S.*?" \
| while read -r a ifc c ; do
ethtool "$ifc"
ethtool -i "$ifc"
Expand Down Expand Up @@ -587,26 +587,26 @@ done`,
},
{
Name: IpmitoolSensorsScriptName,
Script: "LC_ALL=C ipmitool sdr list full",
Script: "LC_ALL=C timeout 30 ipmitool sdr list full",
Superuser: true,
Depends: []string{"ipmitool"},
},
{
Name: IpmitoolChassisScriptName,
Script: "LC_ALL=C ipmitool chassis status",
Script: "LC_ALL=C timeout 30 ipmitool chassis status",
Superuser: true,
Depends: []string{"ipmitool"},
},
{
Name: IpmitoolEventsScriptName,
Script: `LC_ALL=C ipmitool sel elist | tail -n20 | cut -d'|' -f2-`,
Script: `LC_ALL=C timeout 30 ipmitool sel elist | tail -n20 | cut -d'|' -f2-`,
Superuser: true,
Lkms: []string{"ipmi_devintf", "ipmi_si"},
Depends: []string{"ipmitool"},
},
{
Name: IpmitoolEventTimeScriptName,
Script: "LC_ALL=C ipmitool sel time get",
Script: "LC_ALL=C timeout 30 ipmitool sel time get",
Superuser: true,
Depends: []string{"ipmitool"},
},
Expand Down

0 comments on commit d22d05f

Please sign in to comment.