LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   check process (https://www.linuxquestions.org/questions/linux-software-2/check-process-625746/)

ust 03-04-2008 07:53 PM

check process
 
we have many unix-type server , they sometimes have files transfer between them by some method eg .ftp , ssh , rcp , I would like to ask if I want to know what file is transferring / receiving from remote server , for example , if I want to know what file is transferring ( eg. by the command of ssh ) , I heard the command "watch" may do that , I tried watch -n 10 ssh but not work , can advise what can i do it ? thx.

chrism01 03-04-2008 07:56 PM

Try
top -c -u <usrname>

ust 03-04-2008 09:08 PM

Quote:

Originally Posted by chrism01 (Post 3078362)
Try
top -c -u <usrname>

thx reply ,

when I use top -c -u ora_usr

it pops :

top: Unknown argument `u'
usage: top -hvbcisqS -d delay -p pid -n iterations


can advise what is wrong ? thx

chrism01 03-05-2008 12:17 AM

what distro and shell are you running?

ust 03-05-2008 01:44 AM

Quote:

Originally Posted by chrism01 (Post 3078526)
what distro and shell are you running?

RHEL 3 & shell version is 2.4.x .

thx

unSpawn 03-05-2008 02:46 AM

If you know the upload directory (say it's "/var/upload") you could use lsof like 'lsof -w -n +D/var/upload'. Another alternative method could be to use a kernel facility like [i|d]notify. FAM (check out FAM) used dnotify in kernel 2.4 but it's generally considered nonperformant. Inotify is kernel 2.6's answer with which you can use say inotifywait ('inotifywait -m -r -e create /var/upload) and maybe a script that logs whatever it gets to syslog. Using inotify on kernel 2.4 is kind of invasive since it requires the inotify backport kernel patch (and I don't know if it's in the vanilla kernel source) but at least you know there's an alternative.


All times are GMT -5. The time now is 03:41 AM.