Sponsored Content
Operating Systems Solaris How to capture only some part of output when command executed?? Post 302372112 by DukeNuke2 on Tuesday 17th of November 2009 05:45:53 AM
Old 11-17-2009
Quote:
Originally Posted by thegeek
are you looking for something like this ?

Code:
prtdiag -v | grep -A3 'CPU' # print three lines After the pattern matched.

but what if you have 4 cpus or 8 or 64?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

[csh] How to capture output from a command and pass it on to a variable?

Hi there! I'm trying to write a script that will capture output from a command and assign it to a variable. Let's say, for example, I'd like to catch from inside the script whatever the following command outputs: ls *.aaa and put it into a variable "listoffiles". What I tried was: set... (3 Replies)
Discussion started by: machinogodzilla
3 Replies

2. Shell Programming and Scripting

Set specific part in command output into variable

I am trying unsuccessfully to set into a variable a specific part of command output: The command output will be as: line 1: <varied> line 2: 2 options: option 1: Set view: ** NONE ** or option 2: Set view: <different_name_of_views_always_without_spaces> and I would like to get into... (7 Replies)
Discussion started by: orit
7 Replies

3. Shell Programming and Scripting

How do I capture multiple lines of the status output of a command?

I need to know what the upload speed of an Internet connection. I thought the easiest way to do this would be to transfer a file via FTP to my server using the command: sh-3.2$ ftp -u ftp://username:password@computerdomain/directory/ file_to_be_uploaded Note: My environment allows me to issue... (2 Replies)
Discussion started by: zzz1528
2 Replies

4. Shell Programming and Scripting

Enter the command to capture output--help

&& echo "PLEASE enter the command to capture output" || echo "Processing your command manual" x=$# echo $x while do while man $@ | read -r line do >$@.txt ... (1 Reply)
Discussion started by: rrd1986
1 Replies

5. Solaris

How to capture Output of truus command

Hi I want to check if some process is sleeping. I can see that in truss -p <pid> I want to capture output and check that output if proces sis sleeping. Please suggest way to capture output of truss command or other way to check if process is sleeping (1 Reply)
Discussion started by: ankush_mehra
1 Replies

6. Shell Programming and Scripting

Capture output of command triggered in background

Is there any way to trigger a sequence of commands in parallel and capture their output in variables? e.g. something on the following lines x=`echo "X" &` y=`echo "Y" &` z=`echo "Z" &` so that $x, $y, and $z evaluate to X, Y and Z res. (7 Replies)
Discussion started by: jawsnnn
7 Replies

7. HP-UX

How capture all user command line output?

Hi I want to know how capture all user command line output and save this commands and outputs to text files? if you have script for this subject please give me.:o please help me thank you (6 Replies)
Discussion started by: amvhd
6 Replies

8. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

9. Shell Programming and Scripting

Capture run time of python script executed inside shell script

I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Discussion started by: Adfire
2 Replies

10. Programming

Python Paramiko multi threading to capture all output for command applied in loop

My issue : I am getting only last command output data in ouput file. Though comamnd "print(output)" displays data for all 3rd column values but the data saved in file is not what required it hs to be the same which is being printed by command"print(output)". Could you please help me to fix this,... (0 Replies)
Discussion started by: as7951
0 Replies
CPUCTL(8)						    BSD System Manager's Manual 						 CPUCTL(8)

NAME
cpuctl -- program to control CPUs SYNOPSIS
cpuctl command [arguments] DESCRIPTION
The cpuctl command can be used to control and inspect the state of CPUs in the system. The first argument, command, specifies the action to take. Valid commands are: identify cpu Output information on the specified CPU's features and capabilities. Not available on all architectures. list For each CPU in the system, display the current state and time of the last state change. offline cpuno Set the specified CPU off line. Unbound LWPs (lightweight processes) will not be executed on the CPU while it is off line. Bound LWPs will continue to be executed on the CPU, and device interrupts routed to the CPU will continue to be handled. A future release of the system may allow device interrupts to be re-routed away from individual CPUs. At least one CPU in the system must remain on line. online cpuno Set the specified CPU on line, making it available to run unbound LWPs. ucode [file] This applies the microcode patch on all CPUs. The default filename is used if no filename is specified. The identify com- mand prints the installed version on that CPU. On success the identify command show different ucode versions before and after this command. FILES
/dev/cpuctl control device /libdata/firmware/x86/amd/ The directory to install the microcode file for AMD CPUs into. The default filename is microcode_amd.bin for CPU families 0x10 to 0x14. The default filename is microcode_amd_famXXh.bin where XX is the CPU family starting with 15 (hex). Get it from http://www.amd64.org/support/microcode.html EXAMPLES
Run cpuctl identify 0 and you should see something like this: cpu0: UCode version: 0x1000080 After applying the microcode patch with cpuctl ucode you can see with cpuctl identify 0 that the patch got applied: cpu0: UCode version: 0x1000083 SEE ALSO
psrset(8), schedctl(8) HISTORY
The cpuctl command first appeared in NetBSD 5.0. BSD
January 13, 2012 BSD
All times are GMT -4. The time now is 12:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy