hackerman Posted January 2, 2007 Report Share Posted January 2, 2007 Kā var ar php palīdzību noteikt servera darbošanās laiku? Zinu, fox bja ielicis tml. skriptu, bet man vajag redzēt cikos serveris ir apstājies :) Un kad atkal atsācis strādāt :) Un arī procentuāli cik ir darbības laiks. Tas vsp ir iespējams? Ja ir, tad kā? Nu cerams, ka sapratāt... :) Link to comment Share on other sites More sharing options...
andrisp Posted January 2, 2007 Report Share Posted January 2, 2007 Teoreetiski to vareetu norealizeet ieksh php un darbinaat uz localhost, bet imo tev vieglaak buus izmantot kaadu aareejo servisu. paguuglee - http://www.google.lv/search?hl=lv&q=mo...r+server+uptime Link to comment Share on other sites More sharing options...
hmnc Posted January 2, 2007 Report Share Posted January 2, 2007 execkjūto 'uptime' caur shellu un izpārsē rezultātu :) Link to comment Share on other sites More sharing options...
rpr Posted January 2, 2007 Report Share Posted January 2, 2007 uztaisi localhost skriptu, kas ik peec min nocheko servera statusu un sagalabaa failaa. bez tam ir tachu logfaili, kuros paraadaas, ja deemons tiek palaists. Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 2, 2007 Report Share Posted January 2, 2007 rpr --> tas ir marazms.... uz FreBSD shitais straadaa.. atradu googlee nepilnas minuutes laikaa: $data = shell_exec('uptime'); $uptime = explode(' up ', $data); $uptime = explode(',', $uptime[1]); $uptime = $uptime[0].', '.$uptime[1]; echo ('Current server uptime: '.$uptime.''); ko tur izgudrot jaunu riteni... // Jūs meklējāt: php + monitor server uptime. Rezultāti 1 - 10 no aptuveni 748 000. (0,10 sekundes) // Nepietiks kur skatiities??? Link to comment Share on other sites More sharing options...
rpr Posted January 2, 2007 Report Share Posted January 2, 2007 (edited) nav jau teikt, ka vinjsh tiek pie shella viens ir servera uptime, bet otrs web deemona uptime. Edited January 2, 2007 by rpr Link to comment Share on other sites More sharing options...
Grey_Wolf Posted January 2, 2007 Report Share Posted January 2, 2007 nav jau teikt, ka vinjsh tiek pie shellaviens ir servera uptime, bet otrs web deemona uptime. nu taadaa gadijumaa lai ieraksta failaa 1 ierakstu start_uniks_time un katrs useris kas ielagojas izrekjina pats nu start liidz curent... faktiski tas arii ir risinaajums (+ startejot Serveri tiek paarrakstiits tas ieraksts , crons? ) Link to comment Share on other sites More sharing options...
Recommended Posts