I think I am close to find the answer, but I get stuck in kstat.
I am using calls to kstat but after getting cpu_info kstat I don't know how to
cast it to the right structure, that gives me core_id field. Here is my code:
.....
kstat_t *kp;
if (strncmp(kp->ks_name, "cpu_info", 8) == 0) {
kstat_read(kc, kp, NULL);
printf("%d: %s\n",kp->ks_kid,kp->ks_name);
cpu_stat_t* statp = (cpu_stat_t *)(kp->ks_data);
Apparently last line doesn't work.
Any help will be appreciated.
This message posted from opensolaris.org
_______________________________________________
opensolaris-discuss mailing list
[email protected]