Hi!
I'm using a script to start a process that might run forever if some parameters are given wrong (it's part of an optimization). I would now like to have the process killed after a certain walltime in that case. So far I get it done with the following lines
./My_process.e &
pid=`ps -ef |... (3 Replies)
I want to find the pid ( by ps ) that has already run over 30 seconds , I know ps only show the minute/hour .
eg. the start time of the below process are 15:19 / 15:20 , but I don't know the exact time ( in term of "second" ) it start to run ( I only know the hour and minute ) , if I want to... (2 Replies)
Except the command "top" , is there other function / tool is used to check the process status in the system like
1. what process are running ?
2. how the CPU are allocating ?
3. how many swap is using ?
4. "
Thx. (1 Reply)
Hi..
I have this code which tells me that if a process is running or not. Actually someone on this forum help me to do it. :) But now If i want to check if the process is not running for more than 10 minutes. Does anyone know the code or syntax that checks if a process is not running for some... (1 Reply)
Hello guys, I have one script running that I need to keep it running 24x7 so I'd like to know how can I implement a sort of monitoring process I mean if for some reason this process dies somehow it gets automatically started again.
Thanks. (8 Replies)
Hi,
I am running certain weblogic instance, in which it's hard to find which instance is stopped or running after stopping the weblogic , cause process status is for all the instance is same.
A URL which shows the instance is stopped or running.
But i have major challenge to check it through... (2 Replies)
I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
For the newbies, I should have posted this years ago....
Here is the standard (tiny) "bread and butter" perl script (on Linux) I use in my crontab files to insure key processes are alive ( just in case ! ) like httpd, named, sshd, etc.
The example below if for named......
... (1 Reply)
Discussion started by: Neo
1 Replies
LEARN ABOUT DEBIAN
app::cmd::command::help
App::Cmd::Command::help(3pm) User Contributed Perl Documentation App::Cmd::Command::help(3pm)NAME
App::Cmd::Command::help - display a command's help screen
VERSION
version 0.318
DESCRIPTION
This command plugin implements a "help" command. This command will either list all of an App::Cmd's commands and their abstracts, or
display the usage screen for a subcommand with its description.
USAGE
The help text is generated from three sources:
o The "usage_desc" method
o The "description" method
o The "opt_spec" data structure
The "usage_desc" method provides the opening usage line, following the specification described in Getopt::Long::Descriptive. In some
cases, the default "usage_desc" in App::Cmd::Command may be sufficient and you will only need to override it to provide additional command
line usage information.
The "opt_spec" data structure is used with Getopt::Long::Descriptive to generate the description of the optons.
Subcommand classes should override the "discription" method to provide additional information that is prepended before the option
descriptions.
For example, consider the following subcommand module:
package YourApp::Command::initialize;
# This is the default from App::Cmd::Command
sub usage_desc {
my ($self) = @_;
my $desc = $self->SUPER::usage_desc; # "%c COMMAND %o"
return "$desc [DIRECTORY]";
}
sub description {
return "The initialize command prepares the application...";
}
sub opt_spec {
return (
[ "skip-refs|R", "skip reference checks during init", ],
[ "values|v=s@", "starting values", { default => [ 0, 1, 3 ] } ],
);
}
...
That module would generate help output like this:
$ yourapp help initialize
yourapp initialize [-Rv] [long options...] [DIRECTORY]
The initialize command prepares the application...
--help This usage screen
-R --skip-refs skip reference checks during init
-v --values starting values
AUTHOR
Ricardo Signes <rjbs@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Ricardo Signes.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-05-05 App::Cmd::Command::help(3pm)