1Processing diff for: collectl.conf
2--- a/collectl.conf 2025-08-14 08:42:24.434419733 +0000
3+++ b/collectl.conf 2025-08-16 07:56:13.806350456 +0000
4@@ -43,7 +43,7 @@
5 #Ps = /bin/ps
6 #Rpm = /bin/rpm
7 #Lspci = /sbin/lspci
8-#Lctl = /usr/sbin/lctl
9+#Lctl = /usr/sbin/lctl # disabled since collectl 4.0.4
10
11 # I n f i n i b a n d S u p p o r t
12
13@@ -55,10 +55,11 @@
14 # variable below. PQuery for OFED, PCounter for get_pcounter calls and
15 # VStat for ALL non-ofed access of any kind.
16 # can disable either by commenting out the reference to VStat/PQuery below.
17-PQuery = /usr/sbin/perfquery:/usr/bin/perfquery:/usr/local/ofed/bin/perfquery
18-PCounter = /usr/mellanox/bin/get_pcounter
19-VStat = /usr/mellanox/bin/vstat:/usr/bin/vstat
20-OfedInfo = /usr/bin/ofed_info:/usr/local/ofed/bin/ofed_info
21+# Disable the Infiniband support by default
22+# PQuery = /usr/sbin/perfquery:/usr/bin/perfquery:/usr/local/ofed/bin/perfquery
23+# PCounter = /usr/mellanox/bin/get_pcounter
24+# VStat = /usr/mellanox/bin/vstat:/usr/bin/vstat
25+# OfedInfo = /usr/bin/ofed_info:/usr/local/ofed/bin/ofed_info
26
27 # D e f a u l t s
28
29@@ -116,7 +117,7 @@
30 # size, comment out the Resize line and uncomment TermHeight, setting it to
31 # what you want.
32 #TermHeight = 24
33-Resize=/usr/bin/resize:/usr/X11R6/bin/resize
34+Resize=@resize@
35
36 # To turn off Time:HiRes/glibc incompatibility checking, the following
37 # should be enabled and set to 0
38@@ -125,7 +126,7 @@
39 # These control environmental monitoring and to use it you MUST have ipmitool
40 # installed (see http://ipmitool.sourceforge.net/). If not in the path shown
41 # below, you must change it.
42-Ipmitool = /usr/bin/ipmitool:/usr/local/bin/ipmitool:/opt/hptc/sbin/ipmitool
43+Ipmitool = @ipmitool@
44 IpmiCache = /var/run/collectl-ipmicache
45 IpmiTypes = fan,temp,current
46
47Processing diff for: collectl
48--- a/collectl 2025-08-14 08:42:24.434419733 +0000
49+++ b/collectl 2025-08-16 09:25:20.238548613 +0000
50@@ -69,14 +69,14 @@
51 use IO::Select;
52 use Cwd 'abs_path';
53
54-$Cat= '/bin/cat';
55-$Grep= '/bin/grep';
56-$Egrep= '/bin/egrep';
57-$Ps= '/bin/ps';
58-$Rpm= '/bin/rpm';
59-$Lspci= '/sbin/lspci';
60-$Lctl= '/usr/sbin/lctl';
61-$Dmidecode= '/usr/sbin/dmidecode';
62+$Cat= '@cat@';
63+$Grep= '@grep@';
64+$Egrep= '@egrep@';
65+$Ps= '@ps@';
66+$Rpm= '@rpm@';
67+$Lspci= '@lspci@';
68+$Lctl= '/usr/sbin/lctl'; # disabled since collectl 4.0.4
69+$Dmidecode= '@dmidecode@';
70
71 %TopProcTypes=qw(vsz '' rss '' syst '' usrt '' time '' accum '' rkb '' wkb '' iokb ''
72 rkbc '' wkbc '' iokbc '' ioall '' rsys '' wsys '' iosys ''
73@@ -108,7 +108,7 @@
74 $syslogFlag=(eval {require "Sys/Syslog.pm" or die}) ? 1 : 0;
75
76 # Always nice to know if we're root
77-$rootFlag=(!$PcFlag && `whoami`=~/root/) ? 1 : 0;
78+$rootFlag=(!$PcFlag && `@whoami@`=~/root/) ? 1 : 0;
79 $SrcArch= $Config{"archname"};
80
81 $Version= '4.3.20';
82@@ -126,15 +126,15 @@
83 # we're in the background. We also need to know if STDOUT connected to a terminal.
84 if (!$PcFlag)
85 {
86- $MyDir=`pwd`;
87- $Cat= 'cat';
88+ $MyDir=`@pwd@`;
89+ $Cat= '@cat@';
90 $Sep= '/';
91 $backFlag=(getpgrp()!=tcgetpgrp(0)) ? 1 : 0;
92 $termFlag= (-t STDOUT) ? 1 : 0;
93 }
94 else
95 {
96- $MyDir=`cd`;
97+ $MyDir=`@cd@`;
98 $Cat= 'type';
99 $Sep= '\\';
100 $backFlag=0;
101@@ -148,7 +148,7 @@
102 # which was recorded with the data file and WILL override in playback mode.
103 # We also need our host name before calling initRecord() so we can log it at
104 # startup as well as for naming the logfile.
105-$myHost=($PcFlag) ? `hostname` : `/bin/hostname`;
106+$myHost=($PcFlag) ? `@hostname@` : `@hostname@`;
107 $myHost=(split(/\./, $myHost))[0];
108 chomp $myHost;
109 $Host=$myHost;
110@@ -509,12 +509,12 @@
111
112 if ($runasUser!~/^\d+$/)
113 {
114- $runasUid=(split(/:/, `grep ^$runasUser: /etc/passwd`))[2];
115+ $runasUid=(split(/:/, `@grep@ ^$runasUser: /etc/passwd`))[2];
116 error("can't find '$runasUser' in /etc/passwd. Consider UID.") if !defined($runasUid);
117 }
118 if (defined($runasGroup) && $runasGroup!~/^\d+$/)
119 {
120- $runasGid=(split(/:/, `grep ^$runasGroup: /etc/group`))[2];
121+ $runasGid=(split(/:/, `@grep@ ^$runasGroup: /etc/group`))[2];
122 error("can't find '$runasGroup' in /etc/group. Consider GID.") if !defined($runasGid);
123 }
124 $runasUid=$runasUser if $runasUser=~/^\d+/;
125@@ -1167,19 +1167,19 @@
126 if (!$PcFlag)
127 {
128 # This matches THIS host, but in playback mode will be reset to the target
129- $Kernel=`uname -r`;
130+ $Kernel=`@uname@ -r`;
131 chomp $Kernel;
132 error("collectl no longer supports 2.4 kernels") if $Kernel=~/^2\.4/;
133
134- $LocalTimeZone=`date +%z`;
135+ $LocalTimeZone=`@date@ +%z`;
136 chomp $LocalTimeZone;
137
138 # Some distros put lspci in /usr/sbin and others in /usr/bin, so take one last look in
139 # those before complaining, but only if in record mode AND only if looking at interconnects
140 if (!-e $Lspci && $playback eq '' && $subsys=~/x/i)
141 {
142- $Lspci=(-e '/usr/sbin/lspci') ? '/usr/sbin/lspci' : '/usr/bin/lspci';
143- if (!-e "/usr/sbin/lspci" && !-e "/usr/bin/lspci")
144+ $Lspci='@lspci@';
145+ if (!-e "@lspci@")
146 {
147 pushmsg('W', "-sx disabled because 'lspci' not in $Lspci or '/usr/sbin' or '/usr/bin'");
148 pushmsg('W', "If somewhere else, move it or define in collectl.conf");
149@@ -1274,7 +1274,7 @@
150 # it further on so not to worry, but at least record a warning.
151 $pid=`$Cat $PidFile`;
152 chomp $pid;
153- @ps=`ps axo pid,command`;
154+ @ps=`@ps@ axo pid,command`;
155 foreach my $line (@ps)
156 {
157 $line=~s/^\s+//; # trim leading whitespace for short pids
158@@ -1551,14 +1551,14 @@
159 }
160
161 # if -N, set priority to 20
162-`renice 20 $$` if $niceFlag;
163+`@renice@ 20 $$` if $niceFlag;
164
165 # Couldn't find anywhere else to put this one...
166 error("-sT only works with -P for now (too much data)")
167 if $TFlag && !$plotFlag;
168
169 # get parent pid so we can check later to see it still there
170-$stat=`cat /proc/$$/stat`;
171+$stat=`@cat@ /proc/$$/stat`;
172 $myPpid=(split(/\s+/, $stat))[3];
173
174 ###############################
175@@ -2311,7 +2311,7 @@
176 printBriefCounters('T');
177 }
178
179- `stty echo` if !$PcFlag && $termFlag && !$backFlag; # in brief mode, we turned it off
180+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag; # in brief mode, we turned it off
181 my $temp=(!$msgFlag) ? ' Try again with -m.' : '';
182 print "No files selected contain the selected data.$temp\n" if !$numProcessed;
183 exit(0);
184@@ -2453,7 +2453,7 @@
185 open STDIN, '/dev/null' or logmsg("F", "Can't read /dev/null: $!");
186 open STDOUT, '>/dev/null' or logmsg("F", "Can't write to /dev/null: $!");
187 open STDERR, '>/dev/null' or logmsg("F", "Can't write to /dev/null: $!");
188- `echo $$ > $PidFile`;
189+ `@echo@ $$ > $PidFile`;
190
191 # Now that we're set up to start, if '--runas' has been sprecified we need to do a
192 # few things that require privs before actually changing our UID. Also note the
193@@ -2469,8 +2469,8 @@
194 $logname=(-d $filename) ? $filename : dirname($filename);
195 $logname.="/$myHost-collectl-$yymm.log";
196
197- `chown $runasUid $logname`;
198- `chgrp $runasGid $logname` if defined($runasGid);
199+ `@chown@ $runasUid $logname`;
200+ `@chgrp@ $runasGid $logname` if defined($runasGid);
201
202 # now we can change our process's ownership taking care to do the group first
203 # since we won't be able to change anything once we change our UID.
204@@ -3244,7 +3244,7 @@
205 # close logs cleanly and turn echo back on because when 'brief' we turned it off.
206 closeLogs($subsys);
207 unlink $PidFile if $daemonFlag;
208-`stty echo` if !$PcFlag && $termFlag && !$backFlag;
209+`@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
210
211 # clean up when in pure top mode
212 if ($numTop && !$topVertFlag)
213@@ -4350,7 +4350,7 @@
214 if (!-e $temp)
215 {
216 logmsg('W', "Creating directory '$temp'");
217- `mkdir $temp`;
218+ `@mkdir@ $temp`;
219 }
220
221 # track number of times same file processed, primarily for options 'a/c'. in
222@@ -5363,7 +5363,7 @@
223
224 # build up the search list being extra neat and leaving
225 # off possible duplicate /etc
226- $configFile="$BinDir/$ConfigFile;$etcDir/$ConfigFile";
227+ $configFile="$BinDir/../etc/$ConfigFile;$etcDir/$ConfigFile";
228 $configFile.=";/etc/$ConfigFile" if $etcDir ne '/etc';
229 }
230 print "Config File Search Path: $configFile\n" if $debug & 1;
231@@ -5789,7 +5789,7 @@
232 # what gets stored in /proc/XXX/stat and to make sure we look at the same
233 # values dynamically as well as staticly, we better pull cmd from the stat
234 # file itself.
235- @ps=`ps axo pid,ppid,uid,comm,user`;
236+ @ps=`@ps@ axo pid,ppid,uid,comm,user`;
237 my $firstFilePass=1;
238 foreach $process (@ps)
239 {
240@@ -6228,7 +6228,7 @@
241 $briefFlag=0;
242 $verboseFlag=1;
243 intervalPrint(time);
244- `stty echo` if !$PcFlag && $termFlag && !$backFlag;
245+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
246 }
247
248 sub error
249@@ -6241,7 +6241,7 @@
250 # printText() will try to send error over socket and we want it local.
251 $sockFlag=0 if $serverFlag;
252
253- `stty echo` if !$PcFlag && $termFlag && !$backFlag;
254+ `@stty@ echo` if !$PcFlag && $termFlag && !$backFlag;
255 logmsg("F", "Error: $text") if $daemonFlag;
256
257 # we can only call printText() when formatit loaded.
258Processing diff for: colmux
259--- a/colmux 2025-08-14 08:42:24.438419919 +0000
260+++ b/colmux 2025-08-15 07:38:22.003168089 +0000
261@@ -78,7 +78,7 @@
262 my $License="colmux may be copied only under the terms of either the Artistic License\n";
263 $License.= "or the GNU General Public License, which may be found in the source kit";
264
265-my $Ping='/bin/ping';
266+my $Ping='@ping@';
267 my $ResizePath='/usr/bin/resize:/usr/X11R6/bin/resize';
268 my $Route='/sbin/route';
269 my $Ifconfig='/sbin/ifconfig';
270@@ -235,7 +235,7 @@
271 $Collectl="sudo $Collectl" if $sudoFlag;
272
273 # ok if host not in known_hosts and when not debugging be sure to turn off motd
274-my $Ssh='/usr/bin/ssh -o StrictHostKeyChecking=no -o BatchMode=yes';
275+my $Ssh='@ssh@ -o StrictHostKeyChecking=no -o BatchMode=yes';
276 $Ssh.=" -o ServerAliveInterval=$keepalive" if $keepalive ne '';
277 $Ssh.=" -q" unless $debug;
278
279@@ -357,7 +357,7 @@
280 # See if any host specs contain 'username@' & reset 'localhost' and
281 # adjust maximum hostname length if necessary.
282 my $hostlen=$hostWidth;
283-my $myhost=`hostname`;
284+my $myhost=`@hostname@`;
285 chomp $myhost;
286
287 my (%usernames, %sshswitch, %aliases);
288@@ -510,7 +510,7 @@
289 $line=~s/^\s+//; # can have leading space
290 my $pid=(split(/\s+/, $line))[0];
291 print "Killing ssh with pid: $pid\n" if $debug & 1;
292- `kill $pid`;
293+ `@kill@ $pid`;
294 }
295 sleep 1; # wait a tad for ssh in thread to exit
296 close PS;
297@@ -983,7 +983,7 @@
298 $line=~s/^\s+//;
299 my $pid=(split(/\s+/, $line))[0];
300 print "Killing ssh with pid: $pid\n" if $debug & 1;
301- `kill $pid`;
302+ `@kill@ $pid`;
303 }
304 }
305
306@@ -1179,7 +1179,7 @@
307 foreach my $host (keys %files)
308 {
309 print "Killing pid $files{$host}->{pid} for '$host'\n" if $debug & 1;
310- `kill -9 $files{$host}->{pid}`;
311+ `@kill@ -9 $files{$host}->{pid}`;
312 #close $files{$host}->{fd} or error("Failed to close playback file for '$host'");
313 }
314
315Processing diff for: formatit.ph
316--- a/formatit.ph 2025-08-14 08:42:24.438419919 +0000
317+++ b/formatit.ph 2025-08-15 07:18:19.548190580 +0000
318@@ -20,19 +20,19 @@
319 $rawPFlag=0; # always 0 when no files involved
320
321 # In some case, we need to know if we're root.
322- $rootFlag=`whoami`;
323+ $rootFlag=`@whoami@`;
324 $rootFlag=($rootFlag=~/root/) ? 1 : 0;
325
326 # be sure to remove domain portion if present. also note we keep the hostname in
327 # two formats, one in it's unaltered form (at least needed by lustre directory
328 # parsing) as well as all lc because it displays nicer.
329- $Host=`hostname`;
330+ $Host=`@hostname@`;
331 chomp $Host;
332 $Host=(split(/\./, $Host))[0];
333 $HostLC=lc($Host);
334
335 # when was system booted?
336- $uptime=(split(/\s+/, `cat /proc/uptime`))[0];
337+ $uptime=(split(/\s+/, `@cat@ /proc/uptime`))[0];
338 $boottime=time-$uptime;
339
340 $Distro=cat('/etc/redhat-release') if -e '/etc/redhat-release';
341@@ -83,11 +83,11 @@
342 if ($subsys=~/y/i && $slabinfoFlag || $slubinfoFlag)
343 {
344 $message='';
345- $message='/proc/slabinfo' if $slabinfoFlag && !(eval {`cat /proc/slabinfo 2>/dev/null` or die});
346- $message='/sys/slab' if $slubinfoFlag && !(eval {`cat /proc/slubinfo 2>/dev/null` or die});
347+ $message='/proc/slabinfo' if $slabinfoFlag && !(eval {`@cat@ /proc/slabinfo 2>/dev/null` or die});
348+ $message='/sys/slab' if $slubinfoFlag && !(eval {`@cat@ /proc/slubinfo 2>/dev/null` or die});
349 if ($message ne '')
350 {
351- my $whoami=`whoami`;
352+ my $whoami=`@whoami@`;
353 chomp $whoami;
354 disableSubsys('y', "/proc/slabinfo is not readable by $whoami");
355 $interval=~s/(^\d*):\d+/$1:/ if $subsys!~/z/i; # remove int2 if not needed or we'll get error
356@@ -132,7 +132,7 @@
357
358 for (my $i=1; $i<$NumCpus; $i++)
359 {
360- my $online=`cat /sys/devices/system/cpu/cpu$i/online`;
361+ my $online=`@cat@ /sys/devices/system/cpu/cpu$i/online`;
362 chomp $online;
363
364 $cpuEnabled[$i]=$online;
365@@ -266,7 +266,7 @@
366 $ibSpeed='??';
367 if (-e '/sys/class/infiniband')
368 {
369- $line=`cat /sys/class/infiniband/*/ports/1/rate 2>&1`;
370+ $line=`@cat@ /sys/class/infiniband/*/ports/1/rate 2>&1`;
371 if ($line=~/\s*(\d+)\s+(\S)/)
372 {
373 $ibSpeed=$1;
374@@ -669,7 +669,7 @@
375 {
376 # Get Luster and SFS Versions before looking at any data structures in the
377 # 'lustreCheck' routines because things change over time
378- $temp=`cat /proc/fs/lustre/version | grep lustre 2>/dev/null`;
379+ $temp=`@cat@ /proc/fs/lustre/version | grep lustre 2>/dev/null`;
380 $temp=~/lustre: (\d+.*)/;
381 $cfsVersion=$1;
382 $sfsVersion='';
383@@ -716,7 +716,7 @@
384 # The first step is to build up a hash of the sizes of all the
385 # existing partitions. Since we're only doing this once, a 'cat's
386 # overhead should be minimal
387- @partitions=`cat /proc/partitions`;
388+ @partitions=`@cat@ /proc/partitions`;
389 foreach $part (@partitions)
390 {
391 # ignore blank lines and header
392@@ -778,7 +778,7 @@
393 $temp=`head -n 1 /proc/slabinfo`;
394 $temp=~/(\d+\.\d+)/;
395 $SlabVersion=$1;
396- $NumSlabs=`cat /proc/slabinfo | wc -l`*1;
397+ $NumSlabs=`@cat@ /proc/slabinfo | wc -l`*1;
398 chomp $NumSlabs;
399 $NumSlabs-=2;
400
401@@ -4127,7 +4127,7 @@
402 $netSpeeds{$netName}='??';
403 if ($line ne '')
404 {
405- $speed=`cat $line 2>&1`;
406+ $speed=`@cat@ $line 2>&1`;
407 chomp $speed;
408 $line=~/.*\/(\S+)\/speed/;
409 my $netName=$1;
410Processing diff for: graphite.ph
411--- a/graphite.ph 2025-08-14 08:42:24.442420106 +0000
412+++ b/graphite.ph 2025-08-14 08:44:07.351625049 +0000
413@@ -117,7 +117,7 @@
414 # behavior for -f logs matches that of -A
415 $rawtooFlag=1 if $filename ne '' && !$plotFlag;
416
417- $graphiteMyHost=(!$graphiteFqdnFlag) ? `hostname` : `hostname -f`;
418+ $graphiteMyHost=(!$graphiteFqdnFlag) ? `@hostname@` : `@hostname@ -f`;
419 chomp $graphiteMyHost;
420 $graphiteMyHost =~ s/\./$graphiteEscape/g if $graphiteEscape ne '';
421
422Processing diff for: vmsum.ph
423--- a/vmsum.ph 2025-08-14 08:42:24.442420106 +0000
424+++ b/vmsum.ph 2025-08-14 08:44:24.184414112 +0000
425@@ -20,8 +20,8 @@
426 my $oneMB=1024*1024;
427 my ($debug, $helpFlag, $instMin, $versionFlag, $zeroFlag);
428
429-my $Ssh= '/usr/bin/ssh';
430-my $Ping='/bin/ping';
431+my $Ssh= '@ssh@';
432+my $Ping='@ping@';
433 my $PingTimeout=1;
434
435 # these control writing the vm text file
436@@ -32,7 +32,7 @@
437
438 my $lexprFlag=0;
439 my $noNetMsg=''; # if not null, problem with n/w stats (very rare)
440-my $hostname=`hostname`;
441+my $hostname=`@hostname@`;
442 chomp $hostname;
443
444 sub vmsumInit