Script for to kill the process Ids when restarting the unix server
Hi,
I need a script to kill the process Ids for the user ABC.
I prepared the following script after that while logging with user therough script i am not sure how to pass the user name and password.Can ou modify the script and help me out.
Moderator's Comments:
Please use next time code tags for your code and data
Hi,
Please let us know of any possiblity of identifying and killing unix proces invoked externally (by an external tool which does not create a session). 'who' command gives idle time of sessions. But what we are looking for is idle time of a process. 'ps' command gives the elapsed/running... (1 Reply)
Hello guys,
I have a process named monitoreo, with 'monitoreo start' my process start until i kill them, now i want to do 'monitoreo stop' to kill them.
After 'monitoreo start' i have this process running:
ps -af
UID PID PPID C STIME TTY TIME CMD
ati 10958 1495 ... (5 Replies)
hello Bros,
I need to write some script that i can put it on crontab which checks for a process X if running. If the process X is ruuning then take the PID and kill it or display message that says process X is not running.
I am using AIX 5.3
Thanks guys.:b: (2 Replies)
Hi Unix Gurus i am somewhat new to unix scripting so need your help to
create a script as below.
# This script would find the process consuming memory beyond a certain #limit. if the meemory consumption is more than 100% for a period of 1
# minute for the specific process. the script would... (0 Replies)
hi friends,
I am trying to automate the daily monitoring process of UNIX server and it's processes. the script are below
i executed the above script using ksh -x monitortest1.sh in root login . It shows error at some lines .
1. i logged in using root ,but it... (8 Replies)
Hi all,
I need a script that will loop around all the current processes and take a pmap -x <process id> and output each pmap to a separate file.
Would anyone have a quick command to do this? (2 Replies)
Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it
This is how we execute the script (and this is the requirement) ... (2 Replies)
Hello all... new to these forums and a bit of a newbie with linux aswell.
I need to figure out how to write a shell script to kill a process by name as given to the script as an argument. I've got that part working OK, but i need to make sure that the script does not allow processes that are... (6 Replies)
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)
I want to kill a process of xterm that is run by hacker with my login name.
So, I write a shell script to do my goal.
I run 2 xterm and then I run my script on a first xterm. it should kill the process of a second xterm but it doesn't.Why?
Here is my code :
#!/bin/ksh
myps=$(ps -f|grep... (7 Replies)
Discussion started by: thsecmaniac
7 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)