ps

Getting The Full Result from "ps"

Hi, How do I get the full width result for the *nix command "ps"? I know we can specify something like "--cols 1000" but is there anyway I can the columns and just print out everything? ...

Is there a way to change effective process name in Python?

Can I change effective process name of a Python script? I want to show a different name instead of the real name of the process when I get the system process list. In C I can set strcpy(argv[0],"othername"); But in Python argv[0] = "othername" doesn't seem to work. When i get process list (with ps ax in my linux box) the real name...

How does PS/PDF store and compress bitmaps?

I am experimenting with a system to scan letters and convert the scanned bitmaps to PDF with the goal to have a high resolution and a small PDF file size. I am prototyping with scanner, GIMP for bitmap manipulation and ImageMagick for bitmap-to-PDF conversion. My process looks as follows: Scan in 3x8bit color, 600 DPI, LZW-compressed...

Unable to find processes unused for half an hour

You can get underground processes by ps ux I am searching a way to find processes to which I have not touched for 30 minutes. How can you find processes unused for an half hour? ...

Processlist

How do I get a process list of all running processes from Python, on Unix, containing then name of the command/process and process id, so I can filter and kill processes. ...

What does it mean WCHAN 'finish' in ps -l <proc_id> output?

I'm running a number of ssh commands in a background. When the triggered-via-ssh command finishes to run, the appropriate background ssh process doesn't get terminated and its ps -l output shows 'finish' for WCHAN and T for 'state'. So why the triggering process is not terminated and what does it mean 'finish' value for WCHAN? Thanks a...

How do you manage to learn photoshop as a programmer?

During the years I've become used to do things with code, not by mouse clicks. Do you have a good way that's especially fit for programmers to learn it? ...

how to check if ruby script is running in background from PHP script ?

say a ruby script is running ruby.rb SOMEUSERID using PHP, how can i find out whether something exactly like that is currently running or not ? Currently i am using PID to check but im not sure if this is efficient. What if there are lot of users running the ruby script, and the ruby script unexpectedly closes. The php script now looks...

Postscript number of copies

Is there a way to edit a postscript file, to add or increase the number of copies to be printed? ...

iPhone System Processes by CPU Rate (top/ps)

What is the best way to programmatically access the processes sorted by cpu rate on the iPhone (similar to that seen in the *nix top command)? sysctl()? ...

Follow pids across machines (ssh)

Hey I am basically trying to write a pstree-like command except that it should follow processes across machines. What I mean is that if I run this : $ ssh $node sleep 1000 Then the command should display something like this : ssh $node -- ($node) sleep 1000 And if I'm running : $ ssh $node ssh $node sleep 1000 ssh $node---($nod...

How does ps show the argv for all processes on Mac OS X?

I'm trying to identify when a particular process is running, based on its arguments, on Mac OS X. There may be several processes running with the same name, but only one will have the arguments I'm looking for. The processes are not owned by the same user who will be running my code. They will not have modified their argv in any way. ...

Getting memory usage from 'ps aux' output with awk

Hello everybody, I have to solve an exercise using awk. Basically I need to retrieve from 'ps aux' command the total of memory usage for each user and format like this: User Total%Mem user1 3.4% user2 1.5% and so on. The problem I can't seem to solve is: how do I know how many users are logged in? And how can I make a di...

ubuntu server PS, ifocnfig, command not working

Dear All, i am working on ubuntu server from past few months and now suddenly ps, ifconfing commnad stop working with below error. user1@Fb1:/usr/bin$ ps -bash: /bin/ps: No such file or directory any suggestions to get this command working back. ...

embed eps file in ps

i convert jpeg image to eps(encapsulated postscript) via jpeg2ps, now i want to embed newly created eps in PS(postscript) file, any idea? actually in ps there are about 80pages, i want to put eps file code in postscript as a header, and in all 80 pages i just want to use its reference to minimize the size of postscript ...

Generating a CSV list from Linux 'ps'

Suppose I have a ps command that looks like this: ps -Ao args:80,time,user --sort time It will give me a "space" separated set of rows. A row might look like this paulnath -bash 00:00:00 I would like to convince ps to delimit by commas(or tabs even!), such that it can be processed automagically by other languages. Please note that...

Is there any way to get ps output programmatically?

I've got a webserver that I'm presently benchmarking for CPU usage. What I'm doing is essentially running one process to slam the server with requests, then running the following bash script to determine the CPU usage: #! /bin/bash for (( ;; )) do echo "`python -c 'import time; print time.time()'`, `ps -p $1 -o '%cpu' | grep -vi ...

RMagick convert ps to pdf

When I convert a ps file to pdf, it works fine on the local machine, but on the production server, it adds margin to the page, as if I selected Scale to Fit instead of Scale: 100% from the Mac OSX Preview print settings. How do i prevent this? Currently, I'm doing: Magick::ImageList::new('cool.ps').write('cool.pdf') # only works on loca...

How do I set the command line arguments in a C program so that it's visible when users type "ps aux" ?

When you type "ps aux" the ps command shows command arguments that the program was run with. Some programs change this as a way of indicating status. I've tried changing argv[] fields and it doesn't seem to work. Is there a standard way to set the command line arguments so that they appear when the user types ps? That is, this doesn't w...

Regex process using cut(Linux)(sh)

Hello people, I'm having a problem with regex in using the command sh cute, the problem is that I want to show all processes that start with g and just show the command, but do not know, help me please? To do this I use the command: ps aux | grep g but this show all process who contains the letter g and i need who start with g and c...