08-14-2017
I have formatted your logic to hopefully make it easier to read and removed the excessive formatting. Please just write in plain text and use the formatting tools on this page directly to keep it all cleaner / clearer.
Can you confirm what language you are wanting to use? It could be ksh, bash, perl, or a variety of others which might have similar syntax but enough subtleties to make it difficult to know how to respond, for instance shell scripts usually use a return code zero for success whereas Perl uses a return of zero for a failure.
Please can you clarify what you need and what tools you are using.
Thanks, in advance,
Robin
10 More Discussions You Might Find Interesting
1. Programming
Hi all,
I like to know how can I get currenlty running process start time and date , I know only porcess id in solaris and hp-ux
and
what is command to get same using ps with switch.
Thanks
Naeem (1 Reply)
Discussion started by: naeem ahmad
1 Replies
2. Shell Programming and Scripting
how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies
3. Shell Programming and Scripting
Hi !
I want to start and stop a process... on different machines(HOSTS)
example :
I have machine1..machine2..machine3
And I have a NFS file system. (Wlsuite/myfile/)
I'm writing a script that will start processes in machine1.... machine2....
Preferably.. I dont want to log... (1 Reply)
Discussion started by: dashok.83
1 Replies
4. Shell Programming and Scripting
Hi all,
I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this:
1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently.
2) So I loaded datafile A... (10 Replies)
Discussion started by: luna_soleil
10 Replies
5. Shell Programming and Scripting
How can i write a script.?
which lists all X process and gets the start minute of each of them.
thanks (1 Reply)
Discussion started by: Anteus
1 Replies
6. UNIX for Dummies Questions & Answers
httpd status is stopped.cant start it again by :
/etc/init.d/httpd restart or /etc/init.d/httpd/start
help needed (2 Replies)
Discussion started by: raksha.s
2 Replies
7. UNIX for Advanced & Expert Users
Hi,
Is there a way to start a process that any other user would have the privs to kill?
Thanks. (1 Reply)
Discussion started by: rebelbuttmunch
1 Replies
8. Shell Programming and Scripting
Hi all,
after reading the post:
* https://www.unix.com/solaris/101653-how-get-process-start-date-time-solaris.html
I wrote my perl script and it worked like a charm.
This script is called every 5 minutes by the monitoring server crontab and is executed on the remote network elements via ssh (the... (6 Replies)
Discussion started by: Evan
6 Replies
9. UNIX for Dummies Questions & Answers
What I need to learn is how to use a script that launches background processes, and then kills those processes as needed.
The script successfully launches the script. But how do I check to see if the job exists before I kill it?
I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies
10. UNIX for Dummies Questions & Answers
Hello, i'm absolutely new to the whole Operating Systems thing. I am pretty much level 0.
My assignment is to "simulate the execution of a stream of processes by a computer system, one CPU, many terminals 12 disk drives, 30 public mailboxes.
The professor runs a series of inputs which is a... (1 Reply)
Discussion started by: JaneSkylar
1 Replies
LEARN ABOUT DEBIAN
scriptmgr2
SCRIPTMGR(1) SCRIPTMGR(1)
NAME
scriptmgr - utility for controlling other skytools scripts.
SYNOPSIS
scriptmgr.py [switches] config.ini <command> [-a | job_name ... ]
DESCRIPTION
scriptmgr is used to manage several scripts together. It discovers potential jobs based on config file glob expression. From config file it
gets both job_name and service type (that is the main section name eg [cube_dispatcher]). For each service type there is subsection in the
config how to handle it. Unknown services are ignored.
COMMANDS
status
scriptmgr config.ini status
Show status for all known jobs.
start
scriptmgr config.ini start -a
scriptmgr config.ini start job_name1 job_name2 ...
launch script(s) that are not running.
stop
scriptmgr config.ini stop -a
scriptmgr config.ini stop job_name1 job_name2 ...
stop script(s) that are running.
restart
scriptmgr config.ini restart -a
scriptmgr config.ini restart job_name1 job_name2 ...
restart scripts.
reload
scriptmgr config.ini reload -a
scriptmgr config.ini reload job_name1 job_name2 ...
Send SIGHUP to scripts that are running.
CONFIG
Common configuration parameters
job_name
Name for particulat job the script does. Script will log under this name to logdb/logserver. The name is also used as default for PgQ
consumer name. It should be unique.
pidfile
Location for pid file. If not given, script is disallowed to daemonize.
logfile
Location for log file.
loop_delay
If continuisly running process, how long to sleep after each work loop, in seconds. Default: 1.
connection_lifetime
Close and reconnect older database connections.
log_count
Number of log files to keep. Default: 3
log_size
Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M)
use_skylog
If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging
module. It allows setting up fully customizable logging setup.
scriptmgr parameters
config_list
List of glob patters for finding config files. Example:
config_list = ~/dbscripts/conf/*.ini, ~/random/conf/*.ini
Service section parameters
cwd
Working directory for script.
args
Arguments to give to script, in addition to -d.
script
Path to script. Unless script is in PATH, full path should be given.
disabled
If this service should be ignored.
Example config file
[scriptmgr]
job_name = scriptmgr_livesrv
logfile = ~/log/%(job_name)s.log
pidfile = ~/pid/%(job_name)s.pid
config_list = ~/scripts/conf/*.ini
# defaults for all service sections
[DEFAULT]
cwd = ~/scripts
[table_dispatcher]
script = table_dispatcher.py
args = -v
[cube_dispatcher]
script = python2.4 cube_dispatcher.py
disabled = 1
[pgqadm]
script = ~/scripts/pgqadm.py
args = ticker
COMMAND LINE SWITCHES
Following switches are common to all skytools.DBScript-based Python programs.
-h, --help
show help message and exit
-q, --quiet
make program silent
-v, --verbose
make program more verbose
-d, --daemon
make program go background
Following switches are used to control already running process. The pidfile is read from config then signal is sent to process id specified
there.
-r, --reload
reload config (send SIGHUP)
-s, --stop
stop program safely (send SIGINT)
-k, --kill
kill program immidiately (send SIGTERM)
Options specific to scriptmgr:
-a, --all
Operate on all non-disabled scripts.
03/13/2012 SCRIPTMGR(1)