Top Forums UNIX for Beginners Questions & Answers How to display processes which have been running for more than a X hours? Post 303031860 by MadeInGermany on Wednesday 6th of March 2019 06:17:42 PM
ps -eo pid,etime

and the "no header" variant
ps -e -o pid= -o etime=

are quite portable (Posix standard).
The usual output format for times is D-HH:MM:SS
where the D- (=days) prefix is only printed if D > 0
This User Gave Thanks to MadeInGermany For This Post:
Test Your Knowledge in Computers #603
Difficulty: Medium
MySQL 8.0 does not maintain information about password history so you cannot enabling restrictions on reuse of previous passwords.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripting Help - Display Processes

Hi, I was wondering if somebody could help me as I am struggling with writing a script for a training course. Ive had to write 5 scripts and this is the last one but am struggling with this even though I understand what it is meant to do..... PROBLEM: write a script which will allow you to... (1 Reply)
Discussion started by: isxrc
1 Replies

2. UNIX for Dummies Questions & Answers

Capture running process for 2 hours with an interval of 10 sec

Hi, Can any one help me on this. How to capture the running process for two hours with an interval of 10 sec. Thanks in andvance Double post, continued here, thread closed (0 Replies)
Discussion started by: sarathkumar
0 Replies

3. Shell Programming and Scripting

Capture running process or 2 hours with an interval of 10 sec

Hi, Can any one help me on this. How to capture the running process for two hours with an interval of 10 sec. Thanks in andvance (1 Reply)
Discussion started by: sarathkumar
1 Replies

4. Shell Programming and Scripting

Capture the running process for 2 hours

Hi, How can i capture the running process for 2 hours. Thanks in advance.:b: (1 Reply)
Discussion started by: sarathkumar
1 Replies

5. Shell Programming and Scripting

List of Running Jobs In Last 4 Hours

Hi Experts, Please help me in this. I am trying this code on AIX 5.3. I need list of jobs that executed in last 4 hours. I have a schedule on this script - cron executes it and sends mail to me for every 2 hours. I have a Job time and have around 100 jobs those execute daily. What all i need... (2 Replies)
Discussion started by: rajubollas
2 Replies

6. UNIX for Dummies Questions & Answers

find the no of processes that ran 2 hours before or earlier

Is there a way to find out the total no of processes that were running ? - 2 or 3 hours before - list those no of processes (3 Replies)
Discussion started by: jansat
3 Replies

7. Shell Programming and Scripting

Display date from twelve hours ago

HI Guys I want to create date folder in unix base on currant date minus 12 hours. Ex: Currant date :07222013 and time is 1 Am So the folder will create date :07212013 (6 Replies)
Discussion started by: pareshkp
6 Replies

8. Shell Programming and Scripting

Print only processes running for more than 24 hours

How can I print ONLY processes running for more than 24 hours. Using ps command or any other method I use this to get a whole list. ps -eo pid,pcpu,pmem,user,args,etime,cmd --sort=start_time We can also sort the outout of the above command to list processes older than 24 hours using... (9 Replies)
Discussion started by: anil510
9 Replies

9. UNIX for Dummies Questions & Answers

At command not running out of hours

Hi All, new to the forum and new to Unix but I have an issue which is annoying on a new level. I have included a short and full version for anyone needing more information. Short Version I am running a set of scripts that work and run fine. one of the scripts arranges the first... (4 Replies)
Discussion started by: Delboy4000
4 Replies

10. UNIX for Beginners Questions & Answers

How to check the processes running longer than 2 hours.?

HI can someone help me to check the process running more than 2 hours. I have the below command which shows the time and process id, however, I only need the processes running more than 2 hours. (8 Replies)
Discussion started by: Vinod
8 Replies
HWLOC-PS(1)							       hwloc							       HWLOC-PS(1)

hwloc-ps - List currently-running processes or threads that are bound SYNOPSIS
hwloc-ps [options] OPTIONS
-a list all processes, even those that are not bound to any specific part of the machine. -p --physical report OS/physical indexes instead of logical indexes -l --logical report logical indexes instead of physical/OS indexes (default) -c --cpuset show process bindings as cpusets instead of objects. -t --threads show threads inside processes. If -a is given as well, list all threads within each process. Otherwise, show all threads inside each process where at least one thread is bound. --whole-system Do not consider administration limitations. --pid-cmd <cmd> Append the output of the given command to each PID line. For each displayed process ID, execute the command <cmd> <pid> and append the first line of its output to the regular hwloc-ps line. DESCRIPTION
By default, hwloc-ps lists only those currently-running processes that are bound. If -t is given, processes that are not bound but contain at least one bound thread are also displayed, as well as all their threads. hwloc-ps displays process identifier, command-line and binding. The binding may be reported as objects or cpusets. By default, process bindings are restricted to the currently available topology. If some processes are bound to processors that are not available to the current process, they are ignored unless --whole-system is given. The output is a plain list. If you wish to annotate the hierarchical topology with processes so as to see how they are actual distributed on the machine, you might want to use lstopo --ps instead (which also only shows processes that are bound). The -a switch can be used to show all processes, if desired. EXAMPLES
If a process is bound, it appears in the default output: $ utils/hwloc-ps 4759 Core:0 myprogram If a process is not bound but 3 of his 4 threads are bound, it only appears in the thread-aware output: $ utils/hwloc-ps $ utils/hwloc-ps -t 4759 Machine:0 myprogram 4759 Machine:0 4761 PU:0 4762 PU:2 4765 PU:1 To display the binding of already running MPI processes (launched by Open MPI) and append their MPI rank (in MPI_COMM_WORLD) to each line: $ utils/hwloc-ps --pid-cmd myscript 29093 L1dCache:0 myprogram OMPI_COMM_WORLD_RANK=0 29094 L1dCache:2 myprogram OMPI_COMM_WORLD_RANK=1 29095 L1dCache:1 myprogram OMPI_COMM_WORLD_RANK=2 29096 L1dCache:3 myprogram OMPI_COMM_WORLD_RANK=3 where myscript is a bash script doing: #!/bin/sh cat /proc/$1/environ 2>/dev/null | xargs --null --max-args=1 echo | grep OMPI_COMM_WORLD_RANK SEE ALSO
hwloc(7), lstopo(1), hwloc-calc(1), hwloc-distrib(1) 1.7 Apr 07, 2013 HWLOC-PS(1)

Featured Tech Videos

All times are GMT -4. The time now is 11:54 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy