Sponsored Content
Top Forums UNIX for Advanced & Expert Users ps avg | grep ? filter the desired out put. Post 302306043 by TonyFullerMalv on Friday 10th of April 2009 04:30:50 PM
Old 04-10-2009
Code:
for DATAPID in `ps -avg | grep Data | awk '{ print $1 }'`; do
 ps -elf | grep ${DATAPID} | grep -v grep
done

Not an elegant one-liner but it might provide what you are after.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Put the output of grep in a variable

Hi, in a shell script how can I put the result of a grep command in a variable : myvariable=grep mystring myfilename Thank you. (3 Replies)
Discussion started by: big123456
3 Replies

2. Solaris

How to grep (say)last-3 and next-3 lines of Desired Pattern

Hi All, OS-Type=Sun-OS 5.8 Sparc9 Processor Can I grep the previous 4 lines and next 4 lines of a matched pattern(context grep)? For example here we need to monitor logs of live traffic.The data obtained from "tail -f LiveTrafficData.log" looks something like this:-... (3 Replies)
Discussion started by: Sujan Banerjee
3 Replies

3. Shell Programming and Scripting

Grep script to filter

Hi, Wondering if anyone could help me with a simple script to filter out multiple things from a file. Right now I just have long lines of grep -v remove file | greg -v etc etc What I would like to do is have grep -v <run everything in a file> tofilter If that makes sense. Basically a... (2 Replies)
Discussion started by: kevin9
2 Replies

4. Shell Programming and Scripting

filter grep command

I have ran into a small issue and I am not sure how to fix it. In one of our current scripts we have this line which does a grep to get the pid of the process. ps -ef | grep nco_p_syslog | grep $x | awk '{print $2}' However this is not returning anything due to the how long the value... (7 Replies)
Discussion started by: LRoberts
7 Replies

5. Shell Programming and Scripting

Filter on a grep

I am attempting to figure out how to only capture part of a grep command I am doing. So far no luck. When I execute.... leviathan:/gfs/home/tivoli>ps -ef | /usr/ucb/ps -auxww | grep nco_p_syslog The results are.... tivoli 10185 0.0 0.0 5888 5168 ? S Oct 23 0:26... (2 Replies)
Discussion started by: LRoberts
2 Replies

6. UNIX for Advanced & Expert Users

filter last 24 hour data and put in new file

i have file server 1 (filesvr01acess.log) and disc server 1 (discsvr01acess.log) in unix box(say ip adress of the box 10.39.66.81) Similiarly i have file server 2 (filesvr01acess.log) and disc server 2(discsvr01acess.log) in another unix box(say ip adress of the box 10.39.66.82). Now my... (1 Reply)
Discussion started by: nripa1
1 Replies

7. Shell Programming and Scripting

ls | grep (i dont know what to put here)

Dear users, I googled for a while, but i have got a lot of different answers regarding a simple unix command. lets say there are a lot of files in a directory. How can i list the files in a directory whose file types is "text"? Thank you in advance (4 Replies)
Discussion started by: kevincobain2000
4 Replies

8. Shell Programming and Scripting

Grep regex filter

Hi, How can I run the grep search in a script to only include compute, not bigcomputer in following search input? " properties = local compute" " properties = local bigcompute" Thank you. -j (6 Replies)
Discussion started by: hce
6 Replies

9. Shell Programming and Scripting

Filter pattern in grep command

Hi, I am having a file like below hello how are you hello... (5 Replies)
Discussion started by: rohit_shinez
5 Replies

10. UNIX for Beginners Questions & Answers

Grep -P does not capture the desired output

Hi, I'm trying to filter the following output to only display information about an alarm where the Status: corresponds to Set. -------------------------------------------------------- Description: hw_optics: RX POWER LANE-0 LOW ALARM Location: Optics0/0/0/21... (6 Replies)
Discussion started by: sand1234
6 Replies
cpufreq-set(1)															    cpufreq-set(1)

NAME
cpufreq-set - A small tool which allows to modify cpufreq settings. SYNTAX
cpufreq-set [options] DESCRIPTION
cpufreq-set allows you to modify cpufreq settings without having to type e.g. "/sys/devices/system/cpu/cpu0/cpufreq/scaling_set_speed" all the time. OPTIONS
-c --cpu <CPU> number of CPU where cpufreq settings shall be modified. -d --min <FREQ> new minimum CPU frequency the governor may select. -u --max <FREQ> new maximum CPU frequency the governor may select. -g --governor <GOV> new cpufreq governor. -f --freq <FREQ> specific frequency to be set. Requires userspace governor to be available and loaded. -r --related modify all hardware-related CPUs at the same time -h --help Prints out the help screen. REMARKS
Omitting the -c or --cpu argument is equivalent to setting it to zero. The -f FREQ, --freq FREQ parameter cannot be combined with any other parameter except the -c CPU, --cpu CPU parameter. FREQuencies can be passed in Hz, kHz (default), MHz, GHz, or THz by postfixing the value with the wanted unit name, without any space (fre- quency in kHz =^ Hz * 0.001 =^ MHz * 1000 =^ GHz * 1000000). On Linux kernels up to 2.6.29, the -r or --related parameter is ignored. FILES
/sys/devices/system/cpu/cpu*/cpufreq/ /proc/cpufreq (deprecated) /proc/sys/cpu/ (deprecated) AUTHORS
Dominik Brodowski <linux@brodo.de> - author Mattia Dongili<malattia@gmail.com> - first autolibtoolization SEE ALSO
cpufreq-info(1), cpufreq-aperf(1) Mattia Dongili 0.1 cpufreq-set(1)
All times are GMT -4. The time now is 07:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy