Find the answer to your Linux question:
Results 1 to 8 of 8
Hi All, Is there a mechanism wherein we can start / restart a process and the time stamp is not updated.Whenever i restart a particular process "ps -ef|grep <process id>" ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4

    Lightbulb Process Start Time

    Hi All,

    Is there a mechanism wherein we can start / restart a process and the time stamp is not updated.Whenever i restart a particular process "ps -ef|grep <process id>" shows the restart time stamp, which i have to avoid.

    Please note that its not a linux internal application. Please suggest if any fix / tweak can be done.


    Thanks
    Vishal

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,098
    One can send a SIGSTOP signal to a linux process and later wake it up again with SIGCONT.
    It depends a bit on how the process handles signals.

    What do you mean with "not a linux internal application."
    and what exactly do you want to achieve?
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4
    Thanks for the reply...

    I meant to say that we are running an application on RHEL and not an internal linux process like httpd etc.. The load average gets quite high intermittently and thereby i need to frequently restart the process. The objective was to hide the restart time

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,098
    I think, investigating why the load is so high at times might be more beneficial.
    Is the load cpu, network, io bound?
    Can the load maybe lowered and/or spread?

    If the application (whatever it is) simply needs more performance, the above metrics and methods can be used to convince business to invest in better hardware.

    No offence, but "Hide restart time" sounds a bit fishy to me.
    imho: If an app drags down a machine, address the problem. Dont hide it.

    Other than that:
    "application" still needs definition
    What are you running? java?
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4
    I am trying to optimize the application so that the load is minimized. Its a java based application and i guess memory handling has some issues...
    As of now there is no business and i am just trying it on a test bed.. i have written a cron job that restarts the application as soon as the avg CPU is more then certain levels. Nothing fishy as such but as i was restarting it manually it just occurred to me if that can be possible in linux. Just trying various optins.. However SIGSTOP / SIGCONT wont work as they dont kill the pid just halts / pauses it..

  6. #6
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,098
    Then no.
    If you really want to kill a process,
    then afaik there is no way the next process can have the start time of the old one.

    How is this important anyway?
    You must always face the curtain with a bow.

  7. #7
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4
    not important in that manner... but sometime just a thought crosses the mind and then we wonder if that's possible.. so just anxious you can say..
    Anyways thanks for the replies..

  8. #8
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    You might try the SIGSTOP/SIGCONT method mentioned. Java has real memory management (garbage collection) issues out-of-the-box. There are techniques you can use in your code to address those, but that takes some real code refactoring generally in order to get the benefit. There are also 3rd party JVM implementations with better garbage collection algorithms that are targeting real-time (hard and soft) applications which may help. Remember, Google is your friend!
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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