04-11-2004
your post really dosnt make much sense. im going to have to assume that you mean terminating the proccess of a remote login session. ie, someone is logged into machine A from machine B, you want to kick them off of machine A. well it depends on how they are logged in. usually you can just kill their shell.
to do this you want to know the PID of the proccess you want to kill. assume the user is seed, so type the command "ps aux"
look for output like:
seed 2230 0.0 0.1 2512 656 pts/1 S 14:51 0:00 bash
aside from all the other information there, the main thing you are looking for is the user who is running the process, thats the first column, the PID which is the second column, then the last column which tells you what the process is.
so as root, or the user seed issue the command:
kill -9 2230
then that process will be killed.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I'm trying to make a script that reads the console input and terminates with CTRL+D. It's absolutely basic but I don't know how to "read" the CTRL+D. I've tried a bunch of things like
EOT=^D
while //with & without quotations
do
read input
echo $input
done
while
while ]
... (12 Replies)
Discussion started by: sanchopansa
12 Replies
2. UNIX for Dummies Questions & Answers
Hi
I was working on a shell script with randomly shows a page of text from a randomly selected topic .As soon as the page is displayed it callers a timer script which keeps on running indefinitely until the timer script is killed by the user.
This is where I have the problem,if I press... (2 Replies)
Discussion started by: mervin2006
2 Replies
3. HP-UX
Hi!
Just want to know if there is one command that I can use to kill processes by its name.
Thanks. (1 Reply)
Discussion started by: love833
1 Replies
4. Shell Programming and Scripting
I now that this isnt the greatest code around. Im a network guy by trade not a programer .. but needed something to compare config files ...
Anyway ... intermittently, the program terminates.
Ive been looking at the code for a week trying to figure it out and Im stumped. Can anyone provide... (0 Replies)
Discussion started by: popeye
0 Replies
5. Shell Programming and Scripting
hi all,
i m running few batch process through shell script using nohup command but when session get terminated(due to network, reboot of desktop and closing session directly) all processes terminating abnormally and core file is generating.
application batch process is connecting oracle... (4 Replies)
Discussion started by: arvindng
4 Replies
6. Shell Programming and Scripting
Hi all , i know i ask a lot of question but these are really hard to solve and important question. I send two scripts:
expect.sh:
#!/usr/local/bin/expect
spawn ssh root@172.30.64.163
expect "login:"
send "root\n"
expect "password:"
send "root\n^M"
interact
and
son.sh:
... (2 Replies)
Discussion started by: fozay
2 Replies
7. UNIX for Dummies Questions & Answers
Hey all,
Does anybody know how to grep or awk from a non-terminating program. For example the program top which displays the process cpu usage, idle %,...etc. I was wondering if I can grep or awk certain fields from it.:confused:
The other thing I was wondering about is how to insert a CTRL-C... (2 Replies)
Discussion started by: ibrahimelkadi
2 Replies
8. IP Networking
Hi,
I have multiple boxes connected using some RAD Routers and these RAD routers are not working as per our expectations. The Data transfer is negligible and speed of connectivity.
I need to check if I can directly terminate an E1 cable connection to my Solaris Box excluding a Router... (1 Reply)
Discussion started by: busyboy
1 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to make a small shell script.In this it will got directory as per variable & run the find command on that directory.There are 120 + directories & not sure all of them are mounted.So the issue is if the directory doesent exists my loops gets terminated. so is there any was... (3 Replies)
Discussion started by: ajaincv
3 Replies
10. Shell Programming and Scripting
I've used threads before, but not with Perl.
I tried looking up these errors and using 'join' instead of 'detach' with no luck.
Here is the code I am currently using:
#!/usr/bin/perl -w
use warnings;
use threads;
use threads::shared;
$Linux='Linux';
$Greek='Greek';
my... (3 Replies)
Discussion started by: Azrael
3 Replies
LEARN ABOUT SUSE
tgt-setup-lun
tgt-setup-lun(8) System Manager's Manual tgt-setup-lun(8)
NAME
tgt-setup-lun - creates a target, adds a device to the target and defines initiators that can connect to the target
SYNOPSIS
tgt-setup-lun -d device -n target_name [initiator_IP1 initiator_IP2 ...] [-h]
DESCRIPTION
Starts tgtd if necessary and creates a target according to the supplied target_name. The format of the target name is as follows:
iqn.2001-04.com.<hostname>-<target_name> The target name must be unique.
The script then adds the requested device to the target. If specific IP addresses are defined, it adds them to the list of allowed initia-
tors for that target. If no IP addresses is defined, it defines that the target accepts any initiator.
EXAMPLES
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81
Create a target that uses /dev/sdb1 and allows connections only from 192.168.10.81 and 192.168.10.82:
tgt-setup-lun -d /dev/sdb1 -n my_target 192.168.10.81 192.168.10.82
Create a target that uses /dev/sdb1 and allows connections from any initiator:
tgt-setup-lun -d /dev/sdb1 -n my_target
Display help:
tgt-setup-lun -h
AUTHOR
Written by Erez Zilber
REPORTING BUGS
Report bugs to <erezz@voltaire.com>.
COPYRIGHT
Copyright (C) Voltaire Ltd. 2008.
tgt-setup-lun(8)