I would like to know how can i get information like %user %kernel %idle etc for each cpu. Getting the infomation for the complete system cpu usage is given below but can you help me in getting each cpu information from cpu 0 to cpu n-1. Is there any kernel symbol for that and if there is how to offset into it.
static struct nlist nlst[] = {
{ "sysinfo", 0, 0, 0, 0, 0 }, /* 0 */
};
if (knlist(nlst, 1, sizeof(struct nlist)) != 0) {
perror("knlist");
return -1;
sysinfo_offset = nlst[0].n_value;
struct sysinfo s_info;
// then i read the value from kmem using
// get sysinfo structure
getkval(sysinfo_offset, (caddr_t)&s_info, sizeof s_info, "sysinfo");
Hi There,
I have zero information and zero knowledge for IBM virtual machine except Amazon cloud and VMware ESXi (Only Linux OS available).
Anyone could provide me the following answer -
Can IBM VM been deploy on X86 and X64 (Intel Chip)?
If answer is yes any chance to deploy AIX OS... (13 Replies)
Hi,
I am working on data stage 8.7 version and I want a script a to view the all log information of the data stage job from UNIX environment.
Can you please help me out by give the script.
Thanks in advance... (7 Replies)
Hi, all! I am new in IBM AIX 5.3.
I tried to activate graphical display when connected to my UNIX server.
1) I downloaded Putty to connect to my UNIX server.
2) Then I downloaded Xming and installed it. After that I installed Xming fonts.
3)Then I downloaded AIX fonts and put them into... (7 Replies)
This is the password aging script for aix just completed. So far tested and still testing on one of our aix server running 5.3.0.0. So anyway as you can see it is very similar to pwage-hpux-T the only difference on aix /etc/passwd file looks in this format. Also for this script to work you need to... (0 Replies)
why IBM-AIX is preferred over HP-UX .....
In what way it is better for infrastructure......?
Suggestions are welcome...
Suggest you read the RULES (0 Replies)
:confused:
Hello everybody, I am a totel dummy when it comes to UNIX!!!
Must be wondering what I am doing here right?
I'm most keen on knowing about-it-all.
I need help.
Wanna know all about the IBM AIX. The versions, the latest.
Please tell me how do I go about my search.
Thanks a... (3 Replies)
CHCPU(8) System Administration CHCPU(8)NAME
chcpu - configure CPUs
SYNOPSIS
chcpu -c|-d|-e|-g cpu-list
chcpu -p mode
chcpu -r|-h|-V
DESCRIPTION
chcpu can modify the state of CPUs. It can enable or disable CPUs, scan for new CPUs, change the CPU dispatching mode of the underlying
hypervisor, and request CPUs from the hypervisor (configure) or return CPUs to the hypervisor (deconfigure).
Some options have a cpu-list argument. Use this argument to specify a comma-separated list of CPUs. The list can contain individual CPU
addresses or ranges of addresses. For example, 0,5,7,9-11 makes the command applicable to the CPUs with the addresses 0, 5, 7, 9, 10, and
11.
OPTIONS -c, --configure cpu-list
Configure the specified CPUs. Configuring a CPU means that the hypervisor takes a CPU from the CPU pool and assigns it to the vir-
tual hardware on which your kernel runs.
-d, --disable cpu-list
Disable the specified CPUs. Disabling a CPU means that the kernel sets it offline.
-e, --enable cpu-list
Enable the specified CPUs. Enabling a CPU means that the kernel sets it online. A CPU must be configured, see -c, before it can be
enabled.
-g, --deconfigure cpu-list
Deconfigure the specified CPUs. Deconfiguring a CPU means that the hypervisor removes the CPU from the virtual hardware on which
the Linux instance runs and returns it to the CPU pool. A CPU must be offline, see -d, before it can be deconfigured.
-p, --dispatch mode
Set the CPU dispatching mode (polarization). This option has an effect only if your hardware architecture and hypervisor support
CPU polarization. Available modes are:
horizontal The workload is spread across all available CPUs.
vertical The workload is concentrated on few CPUs.
-r, --rescan
Trigger a rescan of CPUs. After a rescan, the Linux kernel recognizes the new CPUs. Use this option on systems that do not auto-
matically detect newly attached CPUs.
-V, --version
Display version information and exit.
-h, --help
Display help text and exit.
RETURN CODES
chcpu has the following return codes:
0 success
1 failure
64 partial success
AUTHOR
Heiko Carstens <heiko.carstens@de.ibm.com>
COPYRIGHT
Copyright IBM Corp. 2011
SEE ALSO lscpu(1)AVAILABILITY
The chcpu command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils
/util-linux/>.
util-linux July 2014 CHCPU(8)