- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting question - inside my apache webpage
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:25 AM
02-08-2005 07:25 AM
anyway, thought...hmmm....I'd like to throw in a click & see for system uptime. Well it works fine - for the server running the apache services, but when I try to get it to run for a different server...nope, I just get the uptime info for the server running apache, no matter what other server I select.
Obviously running remsh for uptime for any server works perfect......just not within this webpage.
Hey Patrick if you listening....it's a quick 10 for you -or- anybody else who can tell me how to run a remote uptime command on a webpage.
Thanks,
Rita
What am I missing ....
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:40 AM
02-08-2005 07:40 AM
Re: Scripting question - inside my apache webpage
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:46 AM
02-08-2005 07:46 AM
Re: Scripting question - inside my apache webpage
Rita
And with juggling too many projects again...Don't think I'm gonna see a book on perl anytime soon...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:51 AM
02-08-2005 07:51 AM
Re: Scripting question - inside my apache webpage
BAD Rita, VERY BAD Rita!!! Go sit in the corner!!!
Here go CHEAT (again VERY BAD): http://www.freebsddiary.org/uptime.php
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:57 AM
02-08-2005 07:57 AM
Re: Scripting question - inside my apache webpage
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 07:59 AM
02-08-2005 07:59 AM
Re: Scripting question - inside my apache webpage
OK Harry, I'll try and find time to pick up Perl, any chance you'll come here and help me migrate 4 servers, get those new RP84xx boxes fired up and ready; get that 2-3 ton UPS installed; get the old one out; move all the equipment around in the computer room (and you know that means re-cabling); move out the Novell stuff to the new smaller computer room; surplus all the old stuff out of here........And I'm just getting warmed up cause there's about 5 more smaller boxes that need fired up and things migrated....
What d'ya say Harry....I could use the rest !
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 08:10 AM
02-08-2005 08:10 AM
Re: Scripting question - inside my apache webpage
Some of those samples show how to use Shell crap programming :-))
I'd love to help you, but I'm trying to get my new lab built (proxy, pix, network switch, vpn, servers, ..., electronic lock on door) and the old one rebuilt (additional 50KvA UPS, a few more tons of air, cabling, icky shuffling of the servers from one room to another, ...)
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 08:26 AM
02-08-2005 08:26 AM
SolutionHere's something I just came up with that I think will work for you.
# cat uptime.cgi
#!/bin/sh
SYSNAME=$1
/bin/cat << EOF
Content-Type: text/html
EOF
UPTIME=$(remsh ${SYSNAME} -l root uptime)
/bin/cat << EOF
UPTIME FOR ${SYSNAME} IS : ${UPTIME}
Back to Main Page
This page maintained by Patrick Wallek
EOF
Now the key to the script is the 'remsh' line. The remsh will be executed as the user that the Apache server is running as, which is probably 'www'. Now you've either got to get remsh (or ssh) working for www, or set up someone else's .rhosts file to allow www to remsh to them to run uptime.
The uptime.cgi script goes in the Apache web server's cgi-bin directory and it needs to have 555 permissions.
Once that works, the rest is pretty easy.
Now you call the script from your main web page like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 08:32 AM
02-08-2005 08:32 AM
Re: Scripting question - inside my apache webpage
If you want it in perl, I'll write it in perl for you.
The webpage will be simple.
It will have a
In it.
There may initially be some permission issues with the binaries, but I doubt it.
I do this kind of stuff quite regularly for my customers.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 08:50 AM
02-08-2005 08:50 AM
Re: Scripting question - inside my apache webpage
UPTIME OUTPUT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 08:55 AM
02-08-2005 08:55 AM
Re: Scripting question - inside my apache webpage
What's the weather like out there? I'm only working 60 hours a week, maybe I can come and help...
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2005 12:32 AM
02-09-2005 12:32 AM
Re: Scripting question - inside my apache webpage
Harry...you have fun, I'll be thinking of you as they install our UPS, and then our equipment shuffle starts.
Patrick & Stephen...many thanks and look forward to seeing you guys at the next conference.
John..It's Feb 9 in a mountain state, and the temp on Monday was 61 but starting Thursday...snow.
Thanks bunches !
Rita