senters Posted April 6, 2012 Report Share Posted April 6, 2012 Kā nomonitorēt realtaimā .log failu, kurš atrodas uz attālināta servera? SSH pieejas nav, līdz ar to tail iespēja atkrīt. Eventus db logot negribu. Kādam ir bijusi līdzīga pieredze? Quote Link to comment Share on other sites More sharing options...
Mr.Key Posted April 6, 2012 Report Share Posted April 6, 2012 (edited) Hmm, php lapa, kas pieejama ar autentifikāciju un tajā <?php $a = array(); exec('cat logfails.log', $a); echo implode("\n". $a); ?> (kods, protams, ir tikai domas uzmatums.) Ja vajag realtime update, JavaScript un būs jāizmanto tail + linecount un katrā requestā tailot requesta brīdī esošo linecount - jau nolasīto linecount Edited April 6, 2012 by Mr.Key Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 10, 2012 Report Share Posted April 10, 2012 tail -f logfails Ja gribi webisku aplikāciju, tad cik saprotu node.js ir īpaši izdevīga šādiem mērķiem: http://blog.new-bamboo.co.uk/2009/12/7/real-time-online-activity-monitor-example-with-node-js-and-websocket http://www.chrishannam.co.uk/2011/01/tail-a-file-over-http-with-node-js/ https://github.com/maximiliano/nodejs-tail Quote Link to comment Share on other sites More sharing options...
senters Posted April 11, 2012 Author Report Share Posted April 11, 2012 kā ar tail -f notailot failu, kurš ir uz servera un nav piekļuves pie failsistēmas (kā jau rakstīju topicā)? webiski gan negribu, tāpat arī db logot visu tuftu ir neprāts. Quote Link to comment Share on other sites More sharing options...
Aleksejs Posted April 11, 2012 Report Share Posted April 11, 2012 Nu bet kaut kāda pieeja tak ir? Quote Link to comment Share on other sites More sharing options...
senters Posted April 11, 2012 Author Report Share Posted April 11, 2012 Vienīgā - ftp. Quote Link to comment Share on other sites More sharing options...
Val Posted April 12, 2012 Report Share Posted April 12, 2012 http://www.php.net/manual/en/function.ftp-exec.php Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.