Tag: script

Perl script used with MRTG to graph ping times

We use MRTG extensively to graph many different things.  One of them is pinging of systems, internal and external to the University. Here is the MRTG config section ## CSU to Google Title[csu-google]: CSU to Google Ping Performance Target[csu-google]: `/usr/local/mrtg-2/scripps/pingtime2.pl -c 2 google.com` MaxBytes[csu-google]: 500 AbsMax[csu-google]: 500 Options[csu-google]: gauge, integer, growright YLegend[csu-google]: MilliSeconds ShortLegend[csu-google]: ms …

Continue reading

Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=205

Awk Script to Count Cisco Modules

Here is a quick awk script to count all Cisco components.  The script takes the output of a Cisco IOS “show module” command for 1 or more Cisco switches. Command Used (MOD.out is the output from the “show mod” command) cat MOD.out | grep -v “WS-F” | awk -f  card.awk | sort   Output Cisco,WS-C4506-E,1 …

Continue reading

Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=194

Configure Basic Settings for a fresh OmniOS VMware Guest

Here is a quick and dirty shell script to configure a single interface OmniOS Guest: root@ns1:~# cat addr.sh #!/bin/bash read -p “hostname:” hn hostname $hn echo $hn > /etc/nodename echo “domain csuohio.edu” > /etc/resolv.conf read -p “dns servers up to 3 separated by commas:” dns echo $dns | awk -F’,’ ‘{print “nameserver ” $1}’ >> …

Continue reading

Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=121