ps command showing full code of running script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting ps command showing full code of running script
# 1  
Old 05-28-2012
ps command showing full code of running script

Hi, I have a script running while rsync command is fired to push some files. The output of rsync cmd has been redirected to the script which is used to generate log files containing progress info with formatting. when I enter ps -ef | grep rsync it shows the full scripting code on the cmd line which looks odd. How could I make this output in one line? Smilie
please help.
# 2  
Old 05-28-2012
please add your current code of "rsync command" and result of
Code:
ps -ef|grep  rsync

with question. people will be able to identify the issue.
# 3  
Old 05-28-2012
The rsync command I am using is :
rsync -Sz --append --bwlimit= --progress --verbose -e ssh /tmp/Image-15.img root@localhost11::imgxfer/ 2>error.log | /tmp/rsync-progress.sh localhost11 >process.log

when I enter grep -ef | grep rsync I got the following lines which shows the the contents of script.

root 5774 5771 0 09:05 pts/0 00:00:00 sed --unbuffer ? # Get rid .............
root 5775 5771 0 09:05 pts/0 00:00:00 expect -- /opt/IBM/ITM/lx8266/53/bin/53-unbuffer -p awk ? BEGIN {.........
root 5777 5775 0 09:05 pts/7 00:00:00 awk ? BEGIN { FS = " "; startTi..........

The above all programs has been written into a single script "rsync-progress.sh" which is called as :
"$PROGDIR/53-unbuffer" -p tr '\r' '\n' | sed --unbuffer "$sedProgram" | "$PROGDIR/53-unbuffer" -p awk "$awkProgram" >> "$logFile"

Here, "$sedProgram" is being replaced by all the code and displayed on ps -ef. same happens with awk and expect scripts. How could I supress the printing of content of varible in ps -ef?

Last edited by rajeevra; 05-28-2012 at 11:27 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. HP-UX

PS output is not displaying full process running

I have 4 HPUX 11.31 servers with the same Quality Pack bundles. "AS FAR AS I CAN TELL" no system files have been modified. /usr/bin/ps is the same date size and creation date terminfo file (x-->xterm) is the same date size and creation date shell (ksh) is the same date size and creation date ... (4 Replies)
Discussion started by: mrmurdock
4 Replies

2. Solaris

Zpool showing 100% full

Hi, This is Solaris-10 on Sparc. Due to some reason, one zpool size is showing 100% full, while nothing is there in that. dstr03-zone02 is a non global zone running on physical machine - dstr03 root@dstr03:/# df -h | grep -i zone02 zone02_app_pool 60G 31K 3.8G 1% ... (5 Replies)
Discussion started by: solaris_1977
5 Replies

3. Shell Programming and Scripting

Expect Script not running from cron. Full Paths used

My cron file. Copied $PATH # Minute Hour Day of Month Month Day of Week Command SHELL=/bin/ksh PATH=/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/perl/lib:/perl/lib/lib/perl5:/perl/scripts:.:/perl/lib/local:/home/popeye:/temp 0... (3 Replies)
Discussion started by: popeye
3 Replies

4. Solaris

Interface e1000g0 not showing in running state

Hello all, I have a sun server SunOS PNR1RAD01 5.10 Generic_144488-09 sun4v sparc SUNW,Netra-T5220 where i have an interface e100g0. This was earlier in running state but now this doesnt show running state. I tried to reset the interface, checked the cable but it did not help. Can nyone pls... (10 Replies)
Discussion started by: rajjat2
10 Replies

5. Shell Programming and Scripting

Bash- Command run from script does not pass full parameters with spaces inside

There's a JavaScript file that I call from command line (there's a framework) like so: ./RunDiag.js param1:'string one here' param2:'string two here' I have a shell script where I invoke the above command. I can run it in a script as simple as this #!/bin/bash stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies

6. UNIX for Dummies Questions & Answers

Display full command (including options) information in running

Suppose I am a Unix user, not a root. I can see all commands in running by ps -elf, or some similar commands. Such commands may be submit by other Unix users. Is there a way that I can display those commands with their full parameters/options. For example, I can see a user is running "ls"... (3 Replies)
Discussion started by: happy_lotus
3 Replies

7. UNIX and Linux Applications

Getting error code when running the script 2 (RC)2

hi All, we have a script to remove the files from particular path,when we tryingto run manually the script went to success and removed the files but the same script which is running by other team it got failed and giving the error "2 (RC)2 "..what is the cause of the failure..and we passing the... (2 Replies)
Discussion started by: nagavenkatesh
2 Replies

8. Shell Programming and Scripting

Could not get script name running from ps -ef command ?

hi.. i have one perl script called sendsms.pl. After i execute the perl script as background process and run ps -ef, it did not display the filename. It was display as "/usr/bin/perl". How could execute the perl program and display the filename using ps command ? #./sendsms & #ps -ef |grep... (3 Replies)
Discussion started by: bh_hensem
3 Replies

9. Shell Programming and Scripting

Command Not running in script

Hi Everyone , have a nice day root@sdp01a>SS7Manager -status the problem with above given expression is that i cant add it in script , it only executes if manually given at remote node , can anyone tell me some way to run it in scripts , also i have few more commands aswell , which are for... (2 Replies)
Discussion started by: Dastard
2 Replies
Login or Register to Ask a Question