I am trying to find out number of cores present for hp-ux server from the output of print_manifest (as shown below). i suppose awk will be best tool to use for filtering.
output of print_manifest is :
PHP Code:
System Hardware Model: ia64 hp Integrity Virtual Partition Main Memory: 6137 MB Processors: 2 Intel(R) Itanium(R) Processor 9560 (2.53 GHz, 32 MB) 8 cores, 16 logical processors per socket 6.38 GT/s QPI, CPU version D0 Active processor count: 1 socket 1 core 2 logical processors (2 per socket) LCPU attribute is enabled
search should satisfy below conditions :
1. first it should check for presence of 'core' , this can be achived using
now as the output shows , 8 cores are of physical machine on which this particular vm is built and 1 core is the actual number of cores assigned to this HP-UX vm. so can someone let me know how can i filter out only the numerical value that is 8 and 1
thanks a lot CarloM...i am able to filter out the number of cores using this option
---------- Post updated at 07:46 AM ---------- Previous update was at 07:30 AM ----------
could you please aslo help me in getting the below output as u mentioned
print_manifest | awk '/core/ { print $1 }' gives two line output in my case output is like :
i want to print the last line and i am doing it using command :
now i want to add few comments as in "number of cores:"
could you please let me know how can this be done.
also i am trying to filter out simillar thing for logical processors :
could you suggest some tricks using awk in order to filter out only the digits out of the above mentioned output ..for eg :
output should be :
just one more thing can i have a start pattern as any numerical value and then stop pattern as string for eg :
can i search for start and stop pattern which will give me output as
PHP Code:
16 logical processors 2 logical processors
in your reply the search pattern is /logical processors (.* per socket)/ can we make it as like :
Hi all,
In my SunOS 5.10, the command awk using BEGIN option doesn't print output variables like expected
here is my test:
with the following code everything is alright
ps -eo pcpu,args | grep "httpd" | awk ' { print $1 } '
the result is
0.1
However, with this command
ps -eo... (3 Replies)
Hi Team(Solaris 5.8/Ksh),
How can we save grep output to awk variable when grep returns more than one line or word.
abc.log
# more abc.log
Hi Makarand
How r u
bye Makarand
Hello
when grep returns only 1 word below command works
nawk -v var=`cat abc.log |grep "Hello"` 'BEGIN { if... (6 Replies)
Hello guys,
I'm writing a little script which sends me sms with my shell script via api of a sms provider.
problem is I can't filter my curl output for this site:
site url:... (1 Reply)
Hi ,
I am trying to filter out the below output of fdisk -l command :
fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes
255 heads, 63 sectors/track, 5221 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 ... (9 Replies)
Hey,
I'm using some sensors that can be read by http.
If I run following command:
curl -v 'http://192.168.111.23:8080/sensor/52f5c63cc4221fbbedcb499908a0a823?version=1.0&interval=minute&unit=watt&callback=realtime'
I'm getting:
I would like to put this now in a sheet with only the... (9 Replies)
i have a file which gets appended with 9 records daily and the file keeps growing from then...i use to store the previous day files count in a variable called oldfilecount and current files count as newfilecount.my requirement is that i need to start processing only the new records from the... (3 Replies)
Hi
I have a wireshark file saved (from my network) and I have to analyze the flows inside it.
The problem is that i have to analyze not the complete file (60.000 pkts!) but just a subset of it.
In other words i have to sample the wireshark.file.dump and for example from 60.000 pkts take... (2 Replies)
Hi -
I have a file with contents as below.
12.1 a.txt
12.1 b.txt
12.1 c.txt
13.2 a.txt
13.2 d.txt
14.3 f.txt
15.4 a.txt
15.4 b.txt
15.4 z.txt
I need to print the contents like this.
12.1 a.txt
< >< >< >b.txt
< >< >< >c.txt (7 Replies)
Hi
I have tried this command
cat /etc/passwd | awk -F: '{print$5}'
note that the $5 is the column that displays full name- i.e. Kevin Kambell
To the point, my output is fine except one thing I do not understand that some of output lines have space in front of them which I checked in... (7 Replies)