Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

3396 new psrinfo does not print socket type

Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>
Reviewed by: Yuri Pankov <yuri.pankov@gmail.com>
Reviewed by: Albert Lee <trisk@nexenta.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Richard Lowe <richlowe@richlowe.net>
  • Loading branch information...
commit 48ac0edb8d30534ebdebc9500c3ceb27b59257dd 1 parent f5c2e7e
@hrosenfeld hrosenfeld authored richlowe committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 usr/src/cmd/psrinfo/psrinfo.c
View
11 usr/src/cmd/psrinfo/psrinfo.c
@@ -11,6 +11,7 @@
/*
* Copyright (c) 2012 DEY Storage Systems, Inc. All rights reserved.
+ * Copyright 2012 Nexenta Systems, Inc. All rights reserved.
*/
/*
@@ -97,6 +98,7 @@ struct vcpu {
long v_pchip_id; /* 1 per socket */
char *v_impl;
char *v_brand;
+ char *v_socket;
long v_core_id; /* n per chip_id */
};
@@ -268,6 +270,9 @@ print_vp(int nspec)
if (((len = strlen(vcpu->v_brand)) != 0) &&
(strncmp(vcpu->v_brand, vcpu->v_impl, len) != 0))
(void) printf("\t%s", vcpu->v_brand);
+ if (strcmp(vcpu->v_socket, "Unknown") != 0)
+ (void) printf("\t[ %s: %s ]", _("Socket"),
+ vcpu->v_socket);
(void) putchar('\n');
} else {
for (l2 = chip->p_cores; l2; l2 = l2->l_next) {
@@ -507,6 +512,12 @@ main(int argc, char **argv)
vc->v_brand = mystrdup(knp->value.str.addr.ptr);
}
+ if ((knp = kstat_data_lookup(ksp, "socket_type")) == NULL) {
+ vc->v_socket = "Unknown";
+ } else {
+ vc->v_socket = mystrdup(knp->value.str.addr.ptr);
+ }
+
if ((knp = kstat_data_lookup(ksp, "implementation")) == NULL) {
vc->v_impl = _("(unknown)");
} else {
Please sign in to comment.
Something went wrong with that request. Please try again.