Re: [PHP] Uptime script
Nope, but I do something similar with weather data from my home weather station.:) The jpgraph library (http://freshmeat.net/projects/jpgraph/) is excellent and makes that kind of stuff a snap. A sample graph is attached. - Tim http://www.phptemplates.org On 06 Aug 2001 17:15:53 -0500, Craig Westerman wrote: Does anyone here have a script to run uptime every ten minutes or so, log output, then display daily output in a nice friendly chart? Thanks Craig [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script
At 06.08.2001 23:15, Craig Westerman wrote: Does anyone here have a script to run uptime every ten minutes or so, log output, then display daily output in a nice friendly chart? Seems a bit daft running it every ten minutes, as a server should be up 24/7, how do you plan to check it otherwise? But on a more serious note, check out www.uptimes.net (I used to be ranked in the top 250, but then i had to physically move the box *sniff*) -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script
it seems that www.uptimes.net has shut down, I would of liked to see a site like that. And tsk tsk, couldn't you of moved your machine while it was on :).. All the hard core web server admins carry theirs with a UPS attacked and a Radio Link net connection :) hehehe Andrew - Original Message - From: Andreas D. Landmark [EMAIL PROTECTED] To: PHP-General [EMAIL PROTECTED] Sent: Tuesday, August 07, 2001 1:52 AM Subject: Re: [PHP] Uptime script At 06.08.2001 23:15, Craig Westerman wrote: Does anyone here have a script to run uptime every ten minutes or so, log output, then display daily output in a nice friendly chart? Seems a bit daft running it every ten minutes, as a server should be up 24/7, how do you plan to check it otherwise? But on a more serious note, check out www.uptimes.net (I used to be ranked in the top 250, but then i had to physically move the box *sniff*) -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script
Does anyone here have a script to run uptime every ten minutes or so, log output, then display daily output in a nice friendly chart? Seems a bit daft running it every ten minutes, as a server should be up 24/7, how do you plan to check it otherwise? I'm wanting to chart the server load average data displayed when you run uptime not how many days it has been running. %uptime 6:10PM up 321 days, 6:59, 3 user, load averages: 0.20, 0.16, 0.15 %uptime 6:19PM up 321 days, 7:08, 3 user, load averages: 0.15, 0.16, 0.16 %uptime 10:15PM up 321 days, 11:04, 3 user, load averages: 0.19, 0.24, 0.22 Craig [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script
At 07.08.2001 03:19, Craig Westerman wrote: Does anyone here have a script to run uptime every ten minutes or so, log output, then display daily output in a nice friendly chart? Seems a bit daft running it every ten minutes, as a server should be up 24/7, how do you plan to check it otherwise? I'm wanting to chart the server load average data displayed when you run uptime not how many days it has been running. %uptime 6:10PM up 321 days, 6:59, 3 user, load averages: 0.20, 0.16, 0.15 %uptime 6:19PM up 321 days, 7:08, 3 user, load averages: 0.15, 0.16, 0.16 %uptime 10:15PM up 321 days, 11:04, 3 user, load averages: 0.19, 0.24, 0.22 The correct way to do that would be to read it straight from the source, (eg. /proc/loadav for linux with procfs). That would be much quicker, and it would also save your server a fork for each reading (unless you are running php as a cgi ;-) nice uptime btw... -- Andreas D Landmark / noXtension Real Time, adj.: Here and now, as opposed to fake time, which only occurs there and then. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script
I'm wanting to chart the server load average data displayed when you run The correct way to do that would be to read it straight from the source, (eg. /proc/loadav for linux with procfs). That would be much quicker, and it would also save your server a fork for each reading (unless you are running php as a cgi ;-) nice uptime btw... -- Andreas D Landmark / noXtension I'm running FreeBSD. I'll see if if I can find source as you suggest. Thanks Craig [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
On Wed, May 16, 2001 at 06:35:32PM -0700, Ryan Christensen wrote: Take a machine down, knowing it's uptime? (I.e., it's easier to hack a box that's been up for 5 months.. as opposed to one that hasn't been??) By knowing the uptime and the version of the OS (e.g. kernel-version) you know to which exploits a machine could be vurnerable. Say, linux-kernel 2.2.18 has a exploit of some sort and a patch was released 10 days ago, and a remote machine has a 2.2.18 and a uptime of 20 days, you know that it should be vulnerable to the exploit. but this is getting off-topic... -fkr -- gpg-fingerprint: 076E 1E87 3E05 1C7F B1A0 8A48 0D31 9BD3 D9AC 74D0 |http://www.hazardous.org/ | whois -h whois.ripe.de FKR-RIPE | |all your base are belong to us | shame on me | fkr@IRCnet | -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script?
On Wed, 16 May 2001, Ben Cairns wrote: I know I've seen one before, and before I go write my own version, does anyone know of a PHP script that echoes the uptime of a server (Linux) in days,hour,minutes, etc? Does anyone know a script to do this under WinNT? For Linux it is easy, just read the /proc/uptime file: $uptimevalues = file(/proc/uptime); The first value from /proc/uptime is the uptime, the second is the idle time for the cpu. NT is harder. I don't know anything about that. -- patrik wallstrom | f o o d f i g h t tel: +46-8-6188428 | s t o c k h o l m gsm: +46-708405080 | - - - - - - - - - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
Ben Cairns wrote: I know I've seen one before, and before I go write my own version, does anyone know of a PHP script that echoes the uptime of a server (Linux) in days,hour,minutes, etc? Does anyone know a script to do this under WinNT? http://is-it-true.org/nt/atips/atips228.shtml There's a link there to a freeware utility called 'uptime'. Haven't used it, but I remember poking around months ago for something similar. Ended up not needing it, but I'd found this and a couple others. Search for 'nt uptime dll' on google.com. Good luck. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote: Why would you want to advertise that? Seems like you would be leaking information to crackers ... It's very difficult to imagine how 'uptime' information could be used to cause mischief... chris@server:~$ uptime 8:55pm up 45 days, 13:42, 1 user, load average: 0.07, 0.03, 0.00 -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script?
That's what I was wondering.. hehe.. I just want to be able to show users that the server is stable.. (this is for a server-status page.. shows general information.. only for members of the site anyways.) Ryan -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 11:19 AM To: Matthew Schroebel; [EMAIL PROTECTED] Subject: Re: [PHP] Uptime script? On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote: Why would you want to advertise that? Seems like you would be leaking information to crackers ... It's very difficult to imagine how 'uptime' information could be used to cause mischief... chris@server:~$ uptime 8:55pm up 45 days, 13:42, 1 user, load average: 0.07, 0.03, 0.00 -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
Uptime.exe is available on the WinNT / Win2k resource kit. You can also download it here: http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default. asp On NT, you need at least Service Pack 4 to run it. Ben On Wednesday, May 16, 2001, at 01:55 PM, Ryan Christensen wrote: That's what I was wondering.. hehe.. I just want to be able to show users that the server is stable.. (this is for a server-status page.. shows general information.. only for members of the site anyways.) Ryan -Original Message- From: Christian Reiniger [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 16, 2001 11:19 AM To: Matthew Schroebel; [EMAIL PROTECTED] Subject: Re: [PHP] Uptime script? On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote: Why would you want to advertise that? Seems like you would be leaking information to crackers ... It's very difficult to imagine how 'uptime' information could be used to cause mischief... chris@server:~$ uptime 8:55pm up 45 days, 13:42, 1 user, load average: 0.07, 0.03, 0.00 -- Christian Reiniger LGDC Webmaster (http://sunsite.dk/lgdc/) ...1000100011010101101010110100111010113... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: php-list- [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
If you were trying to take a machine down, it might be useful to know it. Plus it's easily faked. It's very difficult to imagine how 'uptime' information could be used to cause mischief... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
Take a machine down, knowing it's uptime? (I.e., it's easier to hack a box that's been up for 5 months.. as opposed to one that hasn't been??) Easy to fake.. yes.. however if that were the case, I would be the one doing the faking.. in which case I wouldn't be asking.. :) Ryan Christensen - Original Message - From: Matthew Schroebel [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 5:32 PM Subject: Re: [PHP] Uptime script? If you were trying to take a machine down, it might be useful to know it. Plus it's easily faked. It's very difficult to imagine how 'uptime' information could be used to cause mischief... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
also sprach Ryan Christensen (on Wed, 16 May 2001 06:35:32PM -0700): Take a machine down, knowing it's uptime? (I.e., it's easier to hack a box that's been up for 5 months.. as opposed to one that hasn't been??) um, why? please don't answer if you use windoze for then the answer is obvious. no intention to flame or whatever, just reading bugtraq... martin; (greetings from the heart of the sun.) \ echo mailto: !#^.*|tr * mailto:; net@madduck -- this week dragged past me so slowly; the days fell on their knees... -- david bowie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
No.. as I said in my original post, this is on Linux.. so I was actually wondering how it would be a risk in Linux.. not win.. Ryan Christensen OlyPen Technical Support [EMAIL PROTECTED] 360.457.3000 800.303.8696 - Original Message - From: MaD dUCK [EMAIL PROTECTED] To: Ryan Christensen [EMAIL PROTECTED] Cc: Matthew Schroebel [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Wednesday, May 16, 2001 6:45 PM Subject: Re: [PHP] Uptime script? also sprach Ryan Christensen (on Wed, 16 May 2001 06:35:32PM -0700): Take a machine down, knowing it's uptime? (I.e., it's easier to hack a box that's been up for 5 months.. as opposed to one that hasn't been??) um, why? please don't answer if you use windoze for then the answer is obvious. no intention to flame or whatever, just reading bugtraq... martin; (greetings from the heart of the sun.) \ echo mailto: !#^.*|tr * mailto:; net@madduck -- this week dragged past me so slowly; the days fell on their knees... -- david bowie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
also sprach Ryan Christensen (on Wed, 16 May 2001 06:47:08PM -0700): No.. as I said in my original post, this is on Linux.. so I was actually wondering how it would be a risk in Linux.. not win.. sorry, i haven't really followed the thread. well, *iff* your system is properly configured *and* you take good care of it, then uptime is not an indication of vulnerability. however, it may well be an indication of how old your kernel is. if all you want to do is show that your server is stable, then go ahead and state it's running on linux. seriously, i don't think you need to prove it. in fact, it seems kind of silly to do so - it's commonly known and eventually, even the biggest dorks will get tired of service pack 7b service release 2 patch level 3 second attempt. excuse me, but the entire windoze 2000/xp joke is about the dumbest thing that anyone could have ever done to the community. it's ridiculous in fact. however, i have something against those users that try hard for the sake of whatever to have large uptimes. if a new kernel comes out, you give it two weeks to find out about bugs, and if it's good, you slam it on. my machines never have uptimes longer than a month, but that's because i willingly take them down because i care for them. i have never experienced any of my *BSD or Linux machines crash. sure, i have done the equivalent of deleting the registry (rm -rf /etc) or have accidentally disconnected running harddrives, but all UNIX would tell me is to *please* fix it *while* continuing to run and service users as usual. don't compete for high uptimes. take care of your systems and keep them current. and if you are running windoze in a serious environment, the ask yourself why the output field in uptime.exe is only 8 bits in size :-. i found this out as part of a trace debug when someone pointed this out on bugtraq i think and i didn't believe it. martin; (greetings from the heart of the sun.) \ echo mailto: !#^.*|tr * mailto:; net@madduck -- redistribution of this email via the micros~1 network is prohibited. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
At 08:18 PM 5/16/01 +0200, Christian Reiniger wrote: On Wednesday 16 May 2001 15:16, Matthew Schroebel wrote: Why would you want to advertise that? Seems like you would be leaking information to crackers ... It's very difficult to imagine how 'uptime' information could be used to cause mischief... http://www.dvanhorn.org/Status/Index.php -- Dave's Engineering Page: http://www.dvanhorn.org Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
At 03:30 PM 5/16/01 -0500, Ben Gollmer wrote: Uptime.exe is available on the WinNT / Win2k resource kit. You can also download it here: http://www.microsoft.com/ntserver/nts/downloads/management/uptime/default. asp Does the windows version have the ability to count larger than hours? :) -- Dave's Engineering Page: http://www.dvanhorn.org Where's dave? http://www.findu.com/cgi-bin/find.cgi?kc6ete-9 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
On Wednesday, May 16, 2001, at 09:47 PM, Ryan Christensen wrote: No.. as I said in my original post, this is on Linux.. so I was actually wondering how it would be a risk in Linux.. not win.. If you want to get the current uptime in Linux without a system() call, you should be able to fopen() the /proc/uptime file. The first number is the number of seconds the machine has been up, the second is the number of seconds the machine's processes have been idle. -- /chris/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
also sprach Ron Pitts (on Wed, 16 May 2001 10:18:06PM -0400): To unsubscribe, e-mail: [EMAIL PROTECTED] This does not work. This list is like the mafia: Once in, never out. That sucks. The list managers are morons. will you chill please? of course it works. you are at fault. do you want me to unsubscribed you? hint: use the right email address, or send email to php-general-unsubscribe+rpitts=rochester.rr.com. dude, this is a clear case of user interface error... martin; (greetings from the heart of the sun.) \ echo mailto: !#^.*|tr * mailto:; net@madduck -- two manic depressives named mastick had marital problems, quite drastic. her mood swings were mild, but his were quite wild. the two were not homoscedastic. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
also sprach Ron Pitts (on Wed, 16 May 2001 10:18:06PM -0400): To unsubscribe, e-mail: [EMAIL PROTECTED] This does not work. This list is like the mafia: Once in, never out. That sucks. The list managers are morons. will you chill please? of course it works. you are at fault. do you want me to unsubscribed you? hint: use the right email address, or send email to php-general-unsubscribe+rpitts=rochester.rr.com. dude, this is a clear case of user interface error... martin; (greetings from the heart of the sun.) No martin, it doesn't work properly - I just tested it. The problem is the qmail program. It pick the From address out as the subscription address, and it should pick out the From: address instead. They are not the same for everyone, including me. The From address is set to my login name and machine name, i.e. [EMAIL PROTECTED] However, I am subscribed under the name [EMAIL PROTECTED] Qmail picks up the subscribe address properly, but not the unsubscribe. Billy (who doesn't really want to unsubscribe) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Uptime script?
Christopher Heschong [EMAIL PROTECTED] wrote: If you want to get the current uptime in Linux without a system() call, you should be able to fopen() the /proc/uptime file. The first number is the number of seconds the machine has been up, the second is the number of seconds the machine's processes have been idle. I have a function I wrote that displays uptime and takes arguments of time units and decimal places. Have fun. http://www.befriend.com/code_gallery/php/get_uptime/ -- Steve Werby President, Befriend Internet Services LLC http://www.befriend.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Uptime script?
exec(uptime); or system(uptime); Tyler -Original Message- From: Ryan Christensen [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 15, 2001 11:43 PM To: [EMAIL PROTECTED] Subject: [PHP] Uptime script? I know I've seen one before, and before I go write my own version, does anyone know of a PHP script that echoes the uptime of a server (Linux) in days,hour,minutes, etc? Thanks! Ryan Christensen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]