diff options
author | Eugeni Dodonov <eugeni@mandriva.com> | 2010-03-01 17:05:36 -0300 |
---|---|---|
committer | Eugeni Dodonov <eugeni@mandriva.com> | 2010-03-01 17:05:36 -0300 |
commit | 4f6d983ffa7ab621a4abef4ba043b42d14026ecb (patch) | |
tree | 95a6f225c87b07121afcac4ec995313f910e00d1 | |
parent | 78d5a2e84b0a180e60a383da8f4d2332e6bd2469 (diff) | |
download | net_monitor-4f6d983ffa7ab621a4abef4ba043b42d14026ecb.tar net_monitor-4f6d983ffa7ab621a4abef4ba043b42d14026ecb.tar.gz net_monitor-4f6d983ffa7ab621a4abef4ba043b42d14026ecb.tar.bz2 net_monitor-4f6d983ffa7ab621a4abef4ba043b42d14026ecb.tar.xz net_monitor-4f6d983ffa7ab621a4abef4ba043b42d14026ecb.zip |
Added scripts for network uptime accounting
-rw-r--r-- | NEWS | 2 | ||||
-rwxr-xr-x | scripts/netmonitor_down | 11 | ||||
-rwxr-xr-x | scripts/netmonitor_up | 11 |
3 files changed, 24 insertions, 0 deletions
@@ -1,6 +1,8 @@ Mandriva network monitoring tool -- History of user-visible changes Copyright (C) 2009, Mandriva +- added ifup.d and ifdown.d scripts for account network uptime + 0.06: - support selecting default monitoring interface from command line - display interface icons when available diff --git a/scripts/netmonitor_down b/scripts/netmonitor_down new file mode 100755 index 0000000..6ce6064 --- /dev/null +++ b/scripts/netmonitor_down @@ -0,0 +1,11 @@ +#!/bin/sh +# +# simple log the time when connection was started +# + +if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then + . /etc/sysconfig/network-scripts/ifcfg-$1 + if [ "a$ACCOUNTING" = "ayes" ]; then + echo $1:DOWN:$(date +%s) >> /var/log/net_monitor + fi +fi diff --git a/scripts/netmonitor_up b/scripts/netmonitor_up new file mode 100755 index 0000000..a0cba3f --- /dev/null +++ b/scripts/netmonitor_up @@ -0,0 +1,11 @@ +#!/bin/sh +# +# simple log the time when connection was started +# + +if [ -r /etc/sysconfig/network-scripts/ifcfg-$1 ]; then + . /etc/sysconfig/network-scripts/ifcfg-$1 + if [ "a$ACCOUNTING" = "ayes" ]; then + echo $1:UP:$(date +%s) >> /var/log/net_monitor + fi +fi |