date_default_timezone_set('UTC'); while(1){ $seconds=date('s'); if($seconds ==' 00'){ while(1){ echo date("d/M/Y:H:i:s")." Current Time\n"; $seconds=date('s'); $first_digit_of_second=substr($seconds, 0, 1); $past_second=$first_digit_of_second -1; if(($past_second >= 0) and ($past_second <= 5)) { $mod_date=date("d/M/Y:H:i"); $mod_datetime="$mod_date:$past_second"; $OUT=exec("/usr/bin/tail -n1000 /var/log/httpd/ssl_access_log | grep $mod_datetime | wc -l"); echo "Current Users on xxx.com\n".$OUT; echo "\n"; } else: echo "Check SSL_access_log file for details\n"; sleep(10); } } sleep(1); }
want same code in python
Messages In This Thread |
want same code in python - by deepakkr3110 - Nov-22-2019, 06:08 AM
RE: want same code in python - by buran - Nov-22-2019, 06:46 AM
|
Users browsing this thread: 4 Guest(s)