Shutdown server when network inactive

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Shutdown server when network inactive
# 1  
Old 05-15-2013
Shutdown server when network inactive

I was referring script to shutdown server from local interface ubuntuforums.org/archive/index.php/t-2017336.html. This is scheduled in CRON. It will run every 20 minutes
and check for inactivity. It compares the RX and TX packets from 20 minutes ago to detect if they significantly increased. If they haven't, it will force the system to sleep.But in my case its not working properly.
I wanted to know what below expression does.
if [ $rx -le $t_rx ] || [ $tx -le $t_tx ]; then ## If network packets have not changed that much
echo "Powering off ..." >> $log
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Why inactive slave bonding received network package in redhat?

bond0 active in eth0 and inactive in eth4. why eth4 received network package? Bonding Mode: fault-tolerance (active-backup) Primary Slave: eth0 (primary_reselect failure) Currently Active Slave: eth0 MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 ... (4 Replies)
Discussion started by: samran35
4 Replies

2. AIX

Server Shutdown

Hi, is it possible to find out ip address of user who has shutdown or rebooted the server , I have used the command errpt -a , in that it is showing server rebooted but it is not showing ip address who has shutdown the serve, even I have used command last reboot. Please suggest. Regards, ... (3 Replies)
Discussion started by: manoj.solaris
3 Replies

3. UNIX for Advanced & Expert Users

Shutdown the Linux server if no one is using the server

Hi All, I want to shutdown the server if no one is actualy using it. Its a linux server. I thought of sending a msg on users terminal for those who all are logged in and expecting a input from them. If they will reply system should not get shutdown else it should not. Can any one... (2 Replies)
Discussion started by: Sadhana
2 Replies

4. Solaris

Startup and shutdown a server

Are rc scripts executed serially or all at the same time. Is there a way to see this happen? A log file or the syslogd? This is Solaris 10. (2 Replies)
Discussion started by: djehresmann
2 Replies

5. Solaris

Server Shutdown Problem

I have a sparc T1 server (I know its old) running Solaris 8, which we use for testing. It has been very slow in response- prompt takes couple of minutes to come up, so I decided to reboot the server but I can reboot it, it is giving following errors when I try to shutdown it down. root@deva:/#... (3 Replies)
Discussion started by: Tirmazi
3 Replies

6. UNIX for Advanced & Expert Users

RHEL 4 U5 - Server immediate shutdown

Dear all, My server has shutdown frequently. It is AMD64, OS is RHEL 4 U5. I've seen the system log, before the shutdown occured: Jul 29 04:28:56 localhost kernel: EDAC k8 MC0: general bus error: participating processor(local node response), time-out(no timeout) memory transaction... (2 Replies)
Discussion started by: mr_bold
2 Replies

7. AIX

server is getting shutdown

Hi Guys, Please help in this...when we start HACMP services ..server is getting shutdon. Error mesg from cluster.log. Apr 14 08:43:27 bascop17 snmpd: NOTICE: SMUX trap: (0 0) (127.0.0.1+46302+1) Apr 14 08:43:33 bascop17 topsvcs: (Recorded using libct_ffdc.a cv 2):::Error ID:... (1 Reply)
Discussion started by: b_manu78
1 Replies

8. UNIX for Advanced & Expert Users

Mysterious Server Shutdown

Virtually no UNIX admin experience. Any admin duties are shared by several folks with no special training. Today we had our Sun v880 server, running Solaris 5.8, shutdown for no apparent reason. When we checked on server we found it completely powered down, yet still connected to a fully... (6 Replies)
Discussion started by: buechler66
6 Replies

9. UNIX for Advanced & Expert Users

shutdown a unix server

Hi, how to shutdown a unix machine ? We are on SunOS server15.8 Generic_108528-24 sun4u sparc SUNW,Ultra-Enterprise Many thanks. (2 Replies)
Discussion started by: big123456
2 Replies

10. UNIX for Dummies Questions & Answers

Server shutdown Troubleshooting

SCO Unixware 7.1.1 Hi friends, At 11:30pm last night mymain Unix Server hung or rebooted (Unaware which one), and was bot available for 10 minutes. Is there a log file somewhere which will tell me what happened ? I have looked ad /var/adm/syslog, but cannot make head nor tail of it. ... (1 Reply)
Discussion started by: sureshy
1 Replies
Login or Register to Ask a Question
SYSTEMD-RC-LOCAL-GENERATOR(8)				    systemd-rc-local-generator				     SYSTEMD-RC-LOCAL-GENERATOR(8)

NAME
systemd-rc-local-generator - Compatibility generator for starting /etc/rc.local and /usr/sbin/halt.local during boot and shutdown SYNOPSIS
/lib/systemd/system-generators/systemd-rc-local-generator DESCRIPTION
systemd-rc-local-generator is a generator that checks whether /etc/rc.local exists and is executable, and if it is pulls the rc-local.service unit into the boot process. This unit is responsible for running this script during late boot. Note that the script will be run with slightly different semantics than the original System V version, which was run "last" in the boot process, which is a concept that does not translate to systemd. The script is run after network.target, but in parallel with most other regular system services. systemd-rc-local-generator also checks whether /usr/sbin/halt.local exists and is executable, and if it is pulls the halt-local.service unit into the shutdown process. This unit is responsible for running this script during later shutdown. Support for both /etc/rc.local and /usr/sbin/halt.local is provided for compatibility with specific System V systems only. However, it is strongly recommended to avoid making use of these scripts today, and instead provide proper unit files with appropriate dependencies for any scripts to run during the boot or shutdown processes. systemd-rc-local-generator implements systemd.generator(7). SEE ALSO
systemd(1), systemctl(1) systemd 237 SYSTEMD-RC-LOCAL-GENERATOR(8)