4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 f2s database server report
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
php4ever
Junior WebHelper
Junior WebHelper


Joined: 10 Oct 2002
Posts: 49

PostPosted: Thu Jun 20, 2002 5:36 pm (21 years, 10 months ago) Reply with QuoteBack to Top

As of just a few minutes ago today, Thurs 6/20/02:

Database Server

server0002 .......................... DOWN Shocked

server0005 ......................... UP Very Happy

server0019 .......................... UP Very Happy

server0047 ........................... DOWN Sad

if anyone knows of any other database servers at f2s let me know so I can include them, too.
OfflineView User's ProfileFind all posts by php4everSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Sun Jun 23, 2002 4:52 pm (21 years, 10 months ago) Reply with QuoteBack to Top

hmmmmmm, I know this is not related, but I'm looking for a script that can perhaps ping/ test to see if a certain server is online or not and give answers automatically, any ideas?
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
php4ever
Junior WebHelper
Junior WebHelper


Joined: 10 Oct 2002
Posts: 49

PostPosted: Sun Jun 23, 2002 8:53 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Here's a little ping script where you can put in the ip you're interested in testing and then you could use the script with a crontab:

<?
$ip = "www.oreillynet.com";
// ping some server five times and store output in array $output
exec("ping -c 5 $ip", $output);

// format each line of output
while (list(,$val) = each($output)) :
print "<pre>$val</pre>";
endwhile;
?>

Found this little gem sometime ago from the O'Reilly ONLAMP site.

But, if you want something a little better, check out the "Ping-It" script at hotscripts:

http://www.hotscripts.com/PHP/Scripts_and_Programs/Networking_Tools/Ping/

The interface on "Ping-It" is nice and the results are intelligible.

BTW, make sure you have a server that has the ping utility available. f2s apparently doesn't make ping available to users! Sad
OfflineView User's ProfileFind all posts by php4everSend Personal Message
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Jun 24, 2002 7:47 am (21 years, 10 months ago) Reply with QuoteBack to Top

I think it's more a question of whether PHP is running in safe mode. PHP won't let you run that kind of command in safe mode, that's probably why it doesn't work at F2S.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Jun 24, 2002 10:39 am (21 years, 10 months ago) Reply with QuoteBack to Top

Daniel wrote:
I think it's more a question of whether PHP is running in safe mode. PHP won't let you run that kind of command in safe mode, that's probably why it doesn't work at F2S.

Hence why I don't use F2S or Cyberwings.......
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Jun 24, 2002 10:43 am (21 years, 10 months ago) Reply with QuoteBack to Top

I just found out that Cyberwings' servers are no longer running safe mode...

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Mon Jun 24, 2002 10:57 am (21 years, 10 months ago) Reply with QuoteBack to Top

Daniel wrote:
I just found out that Cyberwings' servers are no longer running safe mode...

Plesk 12 was last time I checked, that server is what nightmares are made of, an average of 55% uptime over the past 2 weeks, thats even worse than server39 was on f2s........
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Ben
Senior WebHelper
Senior WebHelper


Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK

PostPosted: Mon Jun 24, 2002 5:02 pm (21 years, 10 months ago) Reply with QuoteBack to Top

Justin wrote:
Daniel wrote:
I think it's more a question of whether PHP is running in safe mode. PHP won't let you run that kind of command in safe mode, that's probably why it doesn't work at F2S.

Hence why I don't use F2S or Cyberwings.......


Cyberwings turn safe mode off if you ask them too...

Edit just read Daniels post and so it seems they no longer run in safe mode at all...

________________________________
Ben Scott

Red and White Kop
OfflineView User's ProfileFind all posts by BenSend Personal MessageSend emailVisit Poster's Website
php4ever
Junior WebHelper
Junior WebHelper


Joined: 10 Oct 2002
Posts: 49

PostPosted: Fri Jun 28, 2002 9:55 pm (21 years, 9 months ago) Reply with QuoteBack to Top

Okay, after putting together Daniel's observation with what a buddy of mine told me about ping, I was able to get ping to work at f2s a few minutes ago. Woo-hoo! Smile

Here's the script I used:

#!/usr/bin/php


<?
// ping some server five times and store output in array $output
exec("ping -c 5 server0002.freedom2surf.net", $output);

// format each line of output
while (list(,$val) = each($output)) :
print "<pre>$val</pre>";
endwhile;
?>

~~~~~~~~~~~~~~~~~~~~~~~~~~~

Note: the #!/usr/bin/php is required for a command of this type b/c as Daniel so rightly noted PHP runs in safe-mode @ f2s. This command basically says use the php binary rather than the server module.

If you try ping without the -c in a script, the script may just hang. The -c paremeter (shorthand for count) basically says "Stop after sending (and receiving) count ECHO_RESPONSE packets."

And, for you newbies who may be wondering what the pre tags are doing in this code, they help to make the output more readable b/c without them it might be diffcult to easily view the resulting output.


And, the resulting output looked, unsurprisingly, like this today: Sad

PING server0002.freedom2surf.net (194.106.33.37): 56 data bytes

--- server0002.freedom2surf.net ping statistics ---
5 packets transmitted, 0 packets received, 100% packet loss

~~~~~~~~~~~~~~~~~

If you are interested in more of the details about ping, here's a really good url:
http://www.oreillynet.com/linux/cmd/p/ping.html

And, here's where I found a working php ping script and they have other networking scripts, too:
http://www.onlamp.com/pub/a/php/2001/04/05/networking.html?page=3

-- php4ever
OfflineView User's ProfileFind all posts by php4everSend Personal Message
Justin
4WebHelp Addict
4WebHelp Addict


Joined: 07 Jan 2002
Posts: 1060

PostPosted: Sat Jun 29, 2002 12:52 pm (21 years, 9 months ago) Reply with QuoteBack to Top

Thanks for that, will come in useful Smile
OfflineView User's ProfileFind all posts by JustinSend Personal MessageSend email
Garth Farley
WebHelper
WebHelper


Joined: 08 Jan 2002
Posts: 69
Location: Ireland

PostPosted: Tue Jul 02, 2002 12:34 am (21 years, 9 months ago) Reply with QuoteBack to Top

Note that if you are on a Windows server, you use -n instead of -c. This is system call, so if you are moving your scripts, PHP cannot fix it for you.

Garth Farley
OfflineView User's ProfileFind all posts by Garth FarleySend Personal Message
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.222944 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme