This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Login | |
| ===== | |
| login username password - no password needed on operator console | |
| A "#" response means its asking for username again (something was wrong in last attempt) | |
| Logout | |
| ====== | |
| kjob | |
| Shutdown |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # CISCO needs commands of the form | |
| # DECNET HOST PUFF 1.22 | |
| # | |
| OUTFILE="nodenames-cisco-ios" | |
| TMPFILE="/tmp/hecnet-cisco-temp.tmp" | |
| curl -sNm 60 http://mim.update.uu.se/hecnod | dos2unix | egrep "^[0-9]" | cut -f 1-2 -d " " | sed -re 's/^/ /' | sed -re 's/[(]/DECNET HOST /' | sed -re 's/[)]//' > ${TMPFILE} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/sbin/sh | |
| # ***** | |
| # /sbin/init.d/rclocal | |
| # execute Linux-style rc.local on HP-UX 11.11 or other rc and init.d based | |
| # Unix environments that don't support rc.local directly; see | |
| # https://supratim-sanyal.blogspot.com/2021/10/linux-style-etcrclocal-for-hp-ux-1111.html | |
| # ***** | |
| # Allowed exit values: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # /root/clear-kernel-memory-cache.sh | |
| # See see https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html | |
| # | |
| sync;sync;sync | |
| echo 3 > /proc/sys/vm/drop_caches | |
| sync;sync;sync |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # /etc/apcupsd/onbattery | |
| # | |
| # This shell script if placed in /etc/apcupsd | |
| # will be called by /etc/apcupsd/apccontrol when the UPS | |
| # goes on batteries. | |
| # We send an email message to root to notify him. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ls -l | |
| total 60 | |
| lrwxrwxrwx 1 root root 27 Aug 17 14:09 annoyme -> do-nothing-event-handler.sh | |
| -rwxr-xr-x 1 root root 4007 Mar 22 2020 apccontrol | |
| -rw-r--r-- 1 root root 13295 Aug 17 12:43 apcupsd.conf | |
| -rw-r--r-- 1 root root 13238 Aug 16 20:22 apcupsd.conf.orig | |
| lrwxrwxrwx 1 root root 27 Aug 17 14:11 battattach -> do-nothing-event-handler.sh | |
| lrwxrwxrwx 1 root root 27 Aug 17 14:11 battdetach -> do-nothing-event-handler.sh | |
| lrwxrwxrwx 1 root root 27 Aug 17 14:10 changeme -> do-nothing-event-handler.sh | |
| lrwxrwxrwx 1 root root 27 Aug 17 14:05 commfailure -> do-nothing-event-handler.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 2021-08-17 11:13:34 +0000 Power failure. | |
| 2021-08-17 11:13:40 +0000 Running on UPS batteries. | |
| 2021-08-17 11:13:43 +0000 Reached remaining time percentage limit on batteries. | |
| 2021-08-17 11:13:43 +0000 Initiating system shutdown! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # /root/save-vms-on-ups-power.sh | |
| # | |
| # SEE https://supratim-sanyal.blogspot.com/2021/09/save-state-of-virtualbox-virtual.html | |
| # | |
| # SANYALnet Labs | Supratim Sanyal's Hobbyist Lab | |
| # | |
| # Based on https://ubuntuforums.org/archive/index.php/t-1890848.html | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # do-nothing-event-handler.sh | |
| # | |
| # return 99 to abort automatic shutdown by apccontrol | |
| # | |
| echo -e "$0 $(date): doing nothing\a" | |
| wall "$0 $(date): doing nothing" | |
| logger "$0 $(date): doing nothing" | |
| exit 99 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| APC : 001,035,0900 | |
| DATE : 2021-09-07 22:18:10 +0000 | |
| HOSTNAME : gigabyte-h410m | |
| VERSION : 3.14.14 (31 May 2016) debian | |
| UPSNAME : SANYALnetLabsUPS | |
| CABLE : USB Cable | |
| DRIVER : USB UPS Driver | |
| UPSMODE : Stand Alone | |
| STARTTIME: 2021-08-17 23:17:44 +0000 | |
| MODEL : Back-UPS ES 550G |