Sponsored Content
Operating Systems HP-UX Hpux pkill,a little help with script Post 302814005 by Linusolaradm1 on Tuesday 28th of May 2013 02:16:24 PM
Old 05-28-2013
Don't work

Code:
#!/usr/bin/sh
COMM=${1}
shift
UNIX95=1 ps -C ${COMM} -o pid='' | while read P
do
kill $1 ${P}
done

Code:
[root@hpux src]# 
pkill -9  inetd

ps -ef|grep inetd
  root   938     1  0 18:35:25 ?         0:00 /usr/sbin/inetd

 

10 More Discussions You Might Find Interesting

1. Solaris

Diffirence between Kill and Pkill Command???

Diffirence between Kill and Pkill Command??? (1 Reply)
Discussion started by: udayn
1 Replies

2. Shell Programming and Scripting

Need Script to Use CPUs on a HPUX server to simulate Workload Manager on HPUX.

I am running HPUX and using WLM (workload manager). I want to write a script to fork CPUs to basically take CPUs from other servers to show that the communication is working and CPU licensing is working. Basically, I want to build a script that will use up CPU on a server. Any ideas? (2 Replies)
Discussion started by: cpolikowsky
2 Replies

3. UNIX for Dummies Questions & Answers

kill/pkill process by CMD info.

I have a process that I'd like to kill. Doing a "ps -fu myusername" gives me: UID PID PPID C STIME TTY TIME CMD myusername 5443 1 0 10:05 ? 00:00:00 /bin/sh /some/path/crap.sh -s /yet/another/path/parentProcess myusername 5593 5443 0 ... (2 Replies)
Discussion started by: mrwatkin
2 Replies

4. Linux

Script migration help from HPUX

Hi, We are looking for the extensive list of Commands/Syntax that were working in HP-UX and will not work on LINUX. We would find such commands and modify them accordingly. Do we have any reference sites or documents. You help would be greatly appreciated. Thanks in advance (2 Replies)
Discussion started by: vijaipersonal
2 Replies

5. Shell Programming and Scripting

Suppressing the terminated message from pkill & killall commands in a bash script

Hi all, I've been pulling my hair out with this problem for 3 days:wall: now without success any help would be massively appreciated. Basically the script is used to shutdown a rails server so a new IP address can be assigned, the shutdown part is taken care of in function_one using the... (2 Replies)
Discussion started by: danmc
2 Replies

6. HP-UX

pwage-hpux-T for Trusted HPUX servers

I'm sharing this in case anybody needs it. Modified from the original solaris pwage script. This modified hpux script will check /etc/password file on hpux trusted systems search /tcb and grep the required u_succhg field. Calculate days to expiry and notify users via email. original solaris... (2 Replies)
Discussion started by: sparcguy
2 Replies

7. Shell Programming and Scripting

Pkill Argument issue

Hi All, I am writing a shell script to kill user processes on all servers using pkill. But when i am passing user id directly ist works but when password userid as variable its not working & getting the below error. # ssh hpadmin@vmtest15.zin33 'sudo /usr/bin/pkill -u $unixid'... (2 Replies)
Discussion started by: ajaincv
2 Replies

8. UNIX for Advanced & Expert Users

pkill won't work on firefox anymore

Can someone tell me why pkill won't work on firefox anymore? (11 Replies)
Discussion started by: cokedude
11 Replies

9. UNIX and Linux Applications

Unix pkill error; does wily obstruct me killing the process?

have two scripts on Unix; one that starts some processes and the other one for killing a process. At first, I ran the .sh without WILY in it and it worked perfectly; in this way, I could also ran my stopper process. However I need WILY in this so I added it to my script but this time, a message... (1 Reply)
Discussion started by: nerdogan551
1 Replies

10. HP-UX

Hpux and bacula script

# bacula status /opt/bacula/bin/bacula-ctl-fd: UNIX95=1;: not found bacula-fd is stopped #! /bin/sh # # bacula-ctl-fd This shell script takes care of starting and stopping # the bacula File daemon. # # This is pretty much watered down version of the RedHat script # that... (9 Replies)
Discussion started by: Linusolaradm1
9 Replies
XTELLD(8)						      System Manager's Manual							 XTELLD(8)

NAME
xtelld - daemon receiving messages from xtell(1) clients SYNOPSIS
xtelld [options] DESCRIPTION
xtelld is daemon receiving messages from the xtell(1) client and displaying them to apropriate user. OPTIONS
--help Short help --alone Force server to run standalone --inetd Force server to act as service of inetd --version Print version information and exit. -sX Lifetime for spawned services (in seconds) ex: -s25 maintain connections for up to 25 seconds -mX Spawn no more than X children services at a time ex: -m15 service no more than 15 requests at once. Note: ignored if inetd service -pX Use port X, default: 4224 -n Do not lookup addresses, use IP numbers instead USAGE
Xtell daemon can run either from inetd(preferred) or from command line. If you decide to start it from inetd, add this line to /etc/ser- vices : xtell 4224/tcp # xtell server and this line to /etc/inetd.conf : xtell stream tcp nowait nobody.tty /usr/sbin/tcpd /usr/local/sbin/xtelld Notice that the entries are separated by tabs, not spaces. Restart inetd with killall -HUP inetd What to do if you are a normal user and want to run xtell daemon: You can't run it from inetd, obviously. Just start ./xtelld to use xtell on default port (4224). In this case, xtell can write messages only to you. If there is another user on that system willing to get messages, either s/he starts xtelld on another port (e.g. ./xtelld -p4225), or makes his/her tty writable by you (e.g. chmod a+rw /dev/tty* /dev/pts/*) AUTHOR
Radovan Garabik (garabik@fmph.uniba.sk) SEE ALSO
xtell(1), write(1), talk(1), talkd(8), tty(1) XTELLD(8)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy