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 :
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 :
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 :
# print_manifest | awk '/core/ { print $1 }'
8
1
i want to print the last line and i am doing it using command :
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
16 logical processors
2 logical processors
in your reply the search pattern is
/logical processors (.* per socket)/
can we make it as like :