search for: wait_time

Displaying 2 results from an estimated 2 matches for "wait_time".

Did you mean: init_time
2004 Apr 06
0
cbqmon.pl
...gt; } > > use Term::Cap; > use Time::HiRes qw(gettimeofday sleep); > > $clear = `clear`; > $terminal = Tgetent Term::Cap; > $origin = $terminal->Tgoto(''cm'',0,0); > $origin2 = $terminal->Tgoto(''cm'',0,3); > > $printrates=0; > $wait_time = 1/$persec - .1; > $starttime = $oldtime = gettimeofday(); > > $header = $origin . "$iface-$watchclass > Class kbps pps backlog dropped borrowed overact. tokens ctokens > ------ ------- ------ -------- -------- -------- -------- -------- ------- -\n"; > >...
2022 Dec 22
3
NUT & UPS, how to shut down client after 2 min on battery?
...I do not know much about NUT, but after some Googling, one idea I have is to in /etc/nut/upsmon.conf on client change to this NOTIFYCMD "/etc/nut/shutdown_script.sh" NOTIFYFLAG ONBATT EXEC And then in /etc/nut/shutdown_script.sh have something like this #!/bin/bash poll_interval=5 wait_time=120 counter=0 no_wait_time=60 no_counter=0 while true do output=$(upsc qnapups at 192.168.222.252 ups.status) if echo "$output" | grep -q "OB" then counter=$((counter + poll_interval)) no_counter=0 else counter=0 no_counter=$((no_counter + poll_interval)...