PEO Posted March 25, 2008 Posted March 25, 2008 I went a bit far with this Looks cool though! http://img167.imageshack.us/img167/549/statusoi4.th.jpg Hi could you put the code on here? looks really smart
Joedetic Posted March 25, 2008 Posted March 25, 2008 I'd be interested in getting that code too Maybe a nice RAR or Zip archive with the pages and everything in?
mullet_man Posted March 25, 2008 Posted March 25, 2008 I would like the code as well ittech if you don't mind sharing??
SYNACK Posted March 25, 2008 Posted March 25, 2008 (edited) I would also be interested in checking out the code. Also I remembered a way to monitor individual service status on Windows servers using WMI I dont think that you can use it via php though just through ASP. strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colRunningServices = objWMIService.ExecQuery("Select * from Win32_Service") For Each objService in colRunningServices 'in VBS script form 'Wscript.Echo objService.DisplayName & VbTab & objService.State 'In ASP form Response.write objService.DisplayName & VbTab & objService.State Next Just replace the * with your service name and the strComputer string with the name of the server. Edited March 25, 2008 by SYNACK
Nick_Parker Posted March 26, 2008 Posted March 26, 2008 I did, all credit needs to go to christhack & especially to webman from Bishop Barrington! attached is my index.php file renamed to index.txtindex.txt 1
zag Posted March 26, 2008 Posted March 26, 2008 Sure here is my code as well, its designed for windows/IIS not linux. To get it working like my screenshot just copy the code into 3 columns on a single webpage. I grabbed the images from google image search to make it look pretty Remember to rename to .phpprinterstatus.txt 1
mullet_man Posted March 26, 2008 Posted March 26, 2008 Am a total idiot and can't get it working, what do I need to do at this end?
russdev Posted March 26, 2008 Posted March 26, 2008 Hi Can we add this all code to a page on the the wiki. Russell
Nick_Parker Posted March 26, 2008 Posted March 26, 2008 Am a total idiot and can't get it working, what do I need to do at this end? in both cases, all you do is rename the file from .txt to .php and run it on a webserver on your network that has PHP installed.
mullet_man Posted March 26, 2008 Posted March 26, 2008 (edited) Just installed PHP now, will give that ago. Cheers Nick. Still no luck, am giving up now Edited March 26, 2008 by mullet_man
zag Posted March 26, 2008 Posted March 26, 2008 All you need is a PHP webserver. Install WAMP if you dont want the hassle of setting it up yourself Then try and show the phpinfo page, if that shows you know php is working. Then rename to .php and run the script, it will show red crosses for everything because its looking for my IP addresses. You need to edit the script to add your IP's or Names of devices.
Rozzer Posted March 26, 2008 Posted March 26, 2008 Hello I seem to be getting this error message: Warning: exec() [function.exec]: Unable to fork [ping **.**.**.** -n 1 -w 1] in C:\Inetpub\wwwroot\status.php on line 51 I have put a dummy address in to and it says the address is online. Any suggestions because i could see this being very helpful. Thanks, Ross
mullet_man Posted March 26, 2008 Posted March 26, 2008 All you need is a PHP webserver. Install WAMP if you dont want the hassle of setting it up yourself Then try and show the phpinfo page, if that shows you know php is working. Then rename to .php and run the script, it will show red crosses for everything because its looking for my IP addresses. You need to edit the script to add your IP's or Names of devices. That didn't work, am giving up am useless when it comes to web sites, and IIS....
russdev Posted March 26, 2008 Posted March 26, 2008 This anyhelp Resolving an unable to fork PHP warning in Windows Warning: exec() [function.exec]: Unable to fork | IIS Aid Russ 2
Doudar Posted March 27, 2008 Posted March 27, 2008 Have got the code to display ok (IIS) but it says everything is up even when I point it to names/ip address that do not exist? Am I missing something here? Regards JohnD
mac_shinobi Posted March 27, 2008 Posted March 27, 2008 Found this : Spiceworks - Free Network Monitoring Software for Network Management and this : Open Source Network Monitor Tools See what you think to them Geoff has most likely seen them all
Joedetic Posted March 27, 2008 Posted March 27, 2008 Thanks for that gecko. A couple I'd not heard of.
DSapseid Posted March 28, 2008 Posted March 28, 2008 i cant get WAMP server to show the localhost page or phpmyadmin i just get a 403 error. do i have to configure iis to look at the wamp folder?
DSapseid Posted March 28, 2008 Posted March 28, 2008 Fixed got it working had forgot to restart the server
DSapseid Posted March 28, 2008 Posted March 28, 2008 I went a bit far with this Looks cool though! http://img167.imageshack.us/img167/549/statusoi4.th.jpg How did you get the three columns to appear properly i have spent the last hour trying to do it and it just isnt liking it:mad:. I have punched the desk so many times my hand hurts Is it possible for you to send me the full code for that page so i can just change the ip address'. Thanks Dan
Valentine Posted March 28, 2008 Posted March 28, 2008 Hmm i cam getting the following error: "PHP Notice: Undefined index: debug in C:\Inetpub\wwwroot\ns\index.php on line 67" which is: if( $_GET["debug"] == "true" ) { $namesonly = false; }
stratisphere Posted March 28, 2008 Posted March 28, 2008 Guys, can I just throw my 2 cents worth in here? We have a system kind of like what you've all been doing at our school (written myself etc, like much of you!), however i found a problem... once some of the brighter kids figured out that it pinged and connected to several servers to see if they were up (wasnt that hard really... it's the most obvious way of doing it), they spammed it by refreshing a page. Now one person doing this doesnt dent the intranet server... but multiply that by a class and boy does it go down quick. We solved this by making a php script which did all the checks, then put the results into a DB. This script is run once a minute and can only be run by the server. Then the public side of the system, simply iterates through the database and shows the systems and their status. This might not be a problem for your schools... but it was for ours as soon as the cat got out the bag!
stratisphere Posted March 28, 2008 Posted March 28, 2008 Hmm i cam getting the following error: "PHP Notice: Undefined index: debug in C:\Inetpub\wwwroot\ns\index.php on line 67" which is: if( $_GET["debug"] == "true" ) { $namesonly = false; } it's a debug notice... you dont have to listen to it. nothing is wrong that will stop it working. Simple solution is, disable debug notices in your php.ini. E.g. mine is error_reporting = E_ALL & ~E_NOTICE This shows all errors except for notices and coding standards warnings.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now