Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Thread Tools Display Modes
  #1   (View Single Post)  
Old 20th January 2009
biscuits biscuits is offline
Port Guard
Join Date: Oct 2008
Posts: 10
Default See processes on other servers?

Got a project im working on at the moment which involves a webpage on one server that needs to query 3 other servers to make sure all their processes (ie apache, postgres etc) are up and running okay (+ other stuff but thats inconsequential at this point).

I'm using PHP's exec() command to query the local FreeBSD OS for all relevant information needed for the "status" webpage im building, and all servers have passkeys (? if thats what you'd call them) so they can automatically ssh with each other without a password prompt.

My only problem now is: How would one FreeBSD machine query another FreeBSD machine to see if a process is running?

Any ideas or am I attempting the near impossible here?

Reply With Quote
  #2   (View Single Post)  
Old 20th January 2009
vermaden's Avatar
vermaden vermaden is offline
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,053

like that maybe directly from PHP:
PHP Code:
$BOX0_STATS system("ssh top -b -ores"$RETVAL);
$BOX1_STATS system("ssh ps aux"$RETVAL);
$BOX2_STATS system("ssh vmstat -c 3"$RETVAL); 
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote
  #3   (View Single Post)  
Old 20th January 2009
biscuits biscuits is offline
Port Guard
Join Date: Oct 2008
Posts: 10

Fantastic! Just what I was after. Didn't know I could do that straight from ssh (thought i maybe had to pipe it with something else).
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mirrored file servers stukov FreeBSD General 2 21st May 2009 01:22 PM
About Dedicated Servers qmemo Off-Topic 7 4th September 2008 02:15 PM
Red Hat servers compromised tanked Other BSD and UNIX/UNIX-like 10 25th August 2008 04:41 PM
chmods for users & hiding processes mike OpenBSD Security 2 12th June 2008 04:15 PM
Apache on two servers but one public IP marco64 General software and network 2 4th June 2008 07:29 PM

All times are GMT. The time now is 05:08 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick