The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Process list rajesh08 UNIX for Dummies Questions & Answers 2 12-08-2008 12:08 PM
List TCP ports with process vimes SUN Solaris 7 10-30-2008 11:22 AM
How to list the resources used for each process victorcheung AIX 3 05-06-2008 02:51 AM
list windows process ncatdesigner UNIX for Advanced & Expert Users 3 03-06-2008 08:02 PM
OS functions for process list jalburger SUN Solaris 1 04-09-2007 06:49 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-29-2009
mbaste2 mbaste2 is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
process list

i read in ps manual that -C cmdlist will just result to processes stated in the cmdlist. i intend to issue this command

ps c -FC "firefox-bin, soffice.bin"

here cmdlist contains two executables only. in the future, this cmdlist will grow. is there a way i can make ps read a csv file as the source of cmdlist?

thanks
  #2 (permalink)  
Old 07-01-2009
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,804
Try process substitution

Code:
ps -C $( < /path/to/my/csvfile.csv)

This assumes you are using a modern POSIX shell, like ksh or bash
  #3 (permalink)  
Old 07-02-2009
mbaste2 mbaste2 is offline
Registered User
  
 

Join Date: Jun 2009
Posts: 4
process list

sir jim,

thanks, that worked!

i am using bash. your reply prodded me to read more on substitution. good lead, sir. may i extend my luck with some more questions?

can the ps command in a server-side script be made to execute on another workstation in the LAN? that is, selected workstation(s) in the network will be asked to run the ps locally but the csv file comes from the server. this is to avoid each workstation having to wget the csv file from the server and copied locally. the output of the ps command is also redirected to a file in the workstation (only because i dont know how to redirect it to a file on the server instead). and sometime later, i can then just execute a cron task to wget those local files into a directory in the server for later processing.

but if a server script can be made to run the ps command (referring to processes running in the workstation) and the ps output can be directed to a file on the server, that would even be better.

i am not sure of my newbeeish approach, better ideas are most welcome. but i am at a loss on what keywords to search over the net.

thanks again
Reply

Bookmarks

Tags
ps

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0