Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unix process status lamp

    Newby help please.

    I am trying to get a script to check whether a unix process exists and then to display a red or green image depending on the result.

    I have tried searching this site and would be grateful if anyone could give point me to an example.

  • #2
    Regular Coder
    Join Date
    Sep 2002
    Location
    Louisiana
    Posts
    576
    Thanks
    0
    Thanked 0 Times in 0 Posts
    unix process??

  • #3
    Regular Coder
    Join Date
    Jun 2002
    Location
    The Netherlands
    Posts
    217
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ehm,this impossible to do with JavaScript.

  • #4
    New to the CF scene
    Join Date
    Nov 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Sorry should have made myself clearer.

    I want to check the unix process with a script and send the output to a file or to any other output that could be checcked

  • #5
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    Yep, still think js ain't gonna help you here. You'll probably need to use perl or some other server side language to pull this off.

  • #6
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    As stated in the "MUST READ- How to post a JavaScript question!" thread:


    5) Know the capabilities and limits of JavaScript before posting. Please familiarize yourself with what JavaScript can- and cannot do- before posting. Many people are posting JS questions that simply cannot be accomplished using the language, period. JavaScript is a client side language, and cannot manipulate the server end in any way, such as saving data to the server, accessing a database etc. JavaScript works strictly on the user end, such as popping up a window, applying an image rollover effect, or determining user screen resolution (*without* the ability to pass this info back to the server).

    If JavaScript is completely new to you, please familiarize yourself somewhat with the language, by visiting the below links

    - JavaScript questions and answers list
    - JavaScript tutorials
    - Advanced JavaScript tutorials
    - Pre-made JavaScripts (illustrates typical JS applications)
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #7
    New Coder
    Join Date
    Jul 2002
    Location
    Florida, USA
    Posts
    96
    Thanks
    0
    Thanked 0 Times in 0 Posts
    This may be possible with PHP... Beyond getting the ps info into a flat file, though, I dunno.

    exec('ps option | grep pid > ps.txt');
    fsomething('ps.txt');

    Easiest thing then would be test if ps.txt has something in it, and if so, you have a process. But I guess you'd need to know the exact pid in that case. hm... Not sure where to go from there, but maybe it will foster an idea.
    if ( bad && possible ) happen();
    Sig re-written for faster processing...


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •