check the utilization of kernel values ?


 
Thread Tools Search this Thread
Operating Systems Solaris check the utilization of kernel values ?
# 1  
Old 10-19-2010
check the utilization of kernel values ?

Any native Solaris commands/scripts to check the utilization of kernel tables/limits in Solaris ? (like equivalent command in HPUX is kcusage)
# 2  
Old 10-19-2010
For Solaris voyeurs, I worked this up from a couple man pages, but as models changed, had to comment out a few lines:

Code:
$ cat mysrc/sysinf.c

#include <stdio.h>
#include <stdlib.h>
#include <sys/systeminfo.h>
#include <unistd.h>
#include <errno.h>

static void p_sysinfo( int name, char *cname ){

  char buf[65536];

  if ( 0 > sysinfo( name, buf, sizeof buf ) ) {
    fputs( "sysinfo(): ", stderr );
    perror( cname );
  } else {
    printf( "%s:\t%s\n", cname, buf );
  }
 }

static void p_sysconf( int name, char *cname ){

  long l ;
 
  errno = 0 ;
  if ( -1 == ( l = sysconf( name ) ) ) {
    if ( errno ) {
      perror( cname );
    } else {
      fputs( cname, stderr );
      fputs( ": Not supported\n", stderr );
    }
  } else {
    printf( "%s: %ld\n", cname, l );
  }
 }

int main( int argc, char **argv ){

  p_sysinfo( SI_ARCHITECTURE, "SI_ARCHITECTURE" );
  p_sysinfo( SI_ARCHITECTURE_32, "SI_ARCHITECTURE_32" );
  p_sysinfo( SI_ARCHITECTURE_64, "SI_ARCHITECTURE_64" );
  p_sysinfo( SI_ARCHITECTURE_K, "SI_ARCHITECTURE_K" );
  p_sysinfo( SI_ARCHITECTURE_NATIVE, "SI_ARCHITECTURE_NATIVE" );
  p_sysinfo( SI_DHCP_CACHE, "SI_DHCP_CACHE" );
  p_sysinfo( SI_HOSTNAME, "SI_HOSTNAME" );
  p_sysinfo( SI_HW_PROVIDER, "SI_HW_PROVIDER" );
  p_sysinfo( SI_HW_SERIAL, "SI_HW_SERIAL" );
  p_sysinfo( SI_ISALIST, "SI_ISALIST" );
  p_sysinfo( SI_MACHINE, "SI_MACHINE" );
  p_sysinfo( SI_PLATFORM, "SI_PLATFORM" );
  p_sysinfo( SI_RELEASE, "SI_RELEASE" );
  /* p_sysinfo( SI_SET_HOSTNAME, "SI_SET_HOSTNAME" ); */
  /* p_sysinfo( SI_SET_SRPC_DOMAIN, "SI_SET_SRPC_DOMAIN" ); */
  p_sysinfo( SI_SRPC_DOMAIN, "SI_SRPC_DOMAIN" );
  p_sysinfo( SI_SYSNAME, "SI_SYSNAME" );
  p_sysinfo( SI_VERSION, "SI_VERSION" );

  p_sysconf( _SC_2_CHAR_TERM, "_SC_2_CHAR_TERM" );
  p_sysconf( _SC_2_C_BIND, "_SC_2_C_BIND" );
  p_sysconf( _SC_2_C_DEV, "_SC_2_C_DEV" );
  p_sysconf( _SC_2_C_VERSION, "_SC_2_C_VERSION" );
  p_sysconf( _SC_2_FORT_DEV, "_SC_2_FORT_DEV" );
  p_sysconf( _SC_2_FORT_RUN, "_SC_2_FORT_RUN" );
  p_sysconf( _SC_2_LOCALEDEF, "_SC_2_LOCALEDEF" );
  p_sysconf( _SC_2_PBS, "_SC_2_PBS" );
  p_sysconf( _SC_2_PBS_ACCOUNTING, "_SC_2_PBS_ACCOUNTING" );
  p_sysconf( _SC_2_PBS_CHECKPOINT, "_SC_2_PBS_CHECKPOINT" );
  p_sysconf( _SC_2_PBS_LOCATE, "_SC_2_PBS_LOCATE" );
  p_sysconf( _SC_2_PBS_MESSAGE, "_SC_2_PBS_MESSAGE" );
  p_sysconf( _SC_2_PBS_TRACK, "_SC_2_PBS_TRACK" );
  p_sysconf( _SC_2_SW_DEV, "_SC_2_SW_DEV" );
  p_sysconf( _SC_2_UPE, "_SC_2_UPE" );
  p_sysconf( _SC_2_VERSION, "_SC_2_VERSION" );
  p_sysconf( _SC_ADVISORY_INFO, "_SC_ADVISORY_INFO" );
  p_sysconf( _SC_AIO_LISTIO_MAX, "_SC_AIO_LISTIO_MAX" );
  p_sysconf( _SC_AIO_MAX, "_SC_AIO_MAX" );
  p_sysconf( _SC_AIO_PRIO_DELTA_MAX, "_SC_AIO_PRIO_DELTA_MAX" );
  p_sysconf( _SC_ARG_MAX, "_SC_ARG_MAX" );
  p_sysconf( _SC_ASYNCHRONOUS_IO, "_SC_ASYNCHRONOUS_IO" );
  p_sysconf( _SC_ATEXIT_MAX, "_SC_ATEXIT_MAX" );
  p_sysconf( _SC_AVPHYS_PAGES, "_SC_AVPHYS_PAGES" );
  p_sysconf( _SC_BARRIERS, "_SC_BARRIERS" );
  p_sysconf( _SC_BC_BASE_MAX, "_SC_BC_BASE_MAX" );
  p_sysconf( _SC_BC_DIM_MAX, "_SC_BC_DIM_MAX" );
  p_sysconf( _SC_BC_SCALE_MAX, "_SC_BC_SCALE_MAX" );
  p_sysconf( _SC_BC_STRING_MAX, "_SC_BC_STRING_MAX" );
  p_sysconf( _SC_CHILD_MAX, "_SC_CHILD_MAX" );
  p_sysconf( _SC_CLK_TCK, "_SC_CLK_TCK" );
  p_sysconf( _SC_CLOCK_SELECTION, "_SC_CLOCK_SELECTION" );
  p_sysconf( _SC_COHER_BLKSZ, "_SC_COHER_BLKSZ" );
  p_sysconf( _SC_COLL_WEIGHTS_MAX, "_SC_COLL_WEIGHTS_MAX" );
  p_sysconf( _SC_CPUID_MAX, "_SC_CPUID_MAX" );
  p_sysconf( _SC_CPUTIME, "_SC_CPUTIME" );
  p_sysconf( _SC_DCACHE_ASSOC, "_SC_DCACHE_ASSOC" );
  p_sysconf( _SC_DCACHE_BLKSZ, "_SC_DCACHE_BLKSZ" );
  p_sysconf( _SC_DCACHE_LINESZ, "_SC_DCACHE_LINESZ" );
  p_sysconf( _SC_DCACHE_SZ, "_SC_DCACHE_SZ" );
  p_sysconf( _SC_DCACHE_TBLKSZ, "_SC_DCACHE_TBLKSZ" );
  p_sysconf( _SC_DELAYTIMER_MAX, "_SC_DELAYTIMER_MAX" );
  p_sysconf( _SC_EXPR_NEST_MAX, "_SC_EXPR_NEST_MAX" );
  p_sysconf( _SC_FSYNC, "_SC_FSYNC" );
  p_sysconf( _SC_GETGR_R_SIZE_MAX, "_SC_GETGR_R_SIZE_MAX" );
  p_sysconf( _SC_GETPW_R_SIZE_MAX, "_SC_GETPW_R_SIZE_MAX" );
  p_sysconf( _SC_HOST_NAME_MAX, "_SC_HOST_NAME_MAX" );
  p_sysconf( _SC_ICACHE_ASSOC, "_SC_ICACHE_ASSOC" );
  p_sysconf( _SC_ICACHE_BLKSZ, "_SC_ICACHE_BLKSZ" );
  p_sysconf( _SC_ICACHE_LINESZ, "_SC_ICACHE_LINESZ" );
  p_sysconf( _SC_ICACHE_SZ, "_SC_ICACHE_SZ" );
  p_sysconf( _SC_IOV_MAX, "_SC_IOV_MAX" );
  p_sysconf( _SC_IPV6, "_SC_IPV6" );
  p_sysconf( _SC_JOB_CONTROL, "_SC_JOB_CONTROL" );
  p_sysconf( _SC_LINE_MAX, "_SC_LINE_MAX" );
  p_sysconf( _SC_LOGIN_NAME_MAX, "_SC_LOGIN_NAME_MAX" );
  p_sysconf( _SC_LOGNAME_MAX, "_SC_LOGNAME_MAX" );
  p_sysconf( _SC_MAPPED_FILES, "_SC_MAPPED_FILES" );
  p_sysconf( _SC_MAXPID, "_SC_MAXPID" );
  p_sysconf( _SC_MEMLOCK, "_SC_MEMLOCK" );
  p_sysconf( _SC_MEMLOCK_RANGE, "_SC_MEMLOCK_RANGE" );
  p_sysconf( _SC_MEMORY_PROTECTION, "_SC_MEMORY_PROTECTION" );
  p_sysconf( _SC_MESSAGE_PASSING, "_SC_MESSAGE_PASSING" );
  p_sysconf( _SC_MONOTONIC_CLOCK, "_SC_MONOTONIC_CLOCK" );
  p_sysconf( _SC_MQ_OPEN_MAX, "_SC_MQ_OPEN_MAX" );
  p_sysconf( _SC_MQ_PRIO_MAX, "_SC_MQ_PRIO_MAX" );
  p_sysconf( _SC_NGROUPS_MAX, "_SC_NGROUPS_MAX" );
  p_sysconf( _SC_NPROCESSORS_CONF, "_SC_NPROCESSORS_CONF" );
  p_sysconf( _SC_NPROCESSORS_MAX, "_SC_NPROCESSORS_MAX" );
  p_sysconf( _SC_NPROCESSORS_ONLN, "_SC_NPROCESSORS_ONLN" );
  p_sysconf( _SC_OPEN_MAX, "_SC_OPEN_MAX" );
  p_sysconf( _SC_PAGESIZE, "_SC_PAGESIZE" );
  p_sysconf( _SC_PASS_MAX, "_SC_PASS_MAX" );
  p_sysconf( _SC_PHYS_PAGES, "_SC_PHYS_PAGES" );
  p_sysconf( _SC_PRIORITIZED_IO, "_SC_PRIORITIZED_IO" );
  p_sysconf( _SC_PRIORITY_SCHEDULING, "_SC_PRIORITY_SCHEDULING" );
  p_sysconf( _SC_RAW_SOCKETS, "_SC_RAW_SOCKETS" );
  p_sysconf( _SC_READER_WRITER_LOCKS, "_SC_READER_WRITER_LOCKS" );
  p_sysconf( _SC_REALTIME_SIGNALS, "_SC_REALTIME_SIGNALS" );
  p_sysconf( _SC_REGEXP, "_SC_REGEXP" );
  p_sysconf( _SC_RE_DUP_MAX, "_SC_RE_DUP_MAX" );
  p_sysconf( _SC_RTSIG_MAX, "_SC_RTSIG_MAX" );
  p_sysconf( _SC_SAVED_IDS, "_SC_SAVED_IDS" );
  p_sysconf( _SC_SEMAPHORES, "_SC_SEMAPHORES" );
  p_sysconf( _SC_SEM_NSEMS_MAX, "_SC_SEM_NSEMS_MAX" );
  p_sysconf( _SC_SEM_VALUE_MAX, "_SC_SEM_VALUE_MAX" );
  p_sysconf( _SC_SHARED_MEMORY_OBJECTS, "_SC_SHARED_MEMORY_OBJECTS" );
  p_sysconf( _SC_SHELL, "_SC_SHELL" );
  p_sysconf( _SC_SIGQUEUE_MAX, "_SC_SIGQUEUE_MAX" );
  p_sysconf( _SC_SIGRT_MAX, "_SC_SIGRT_MAX" );
  p_sysconf( _SC_SIGRT_MIN, "_SC_SIGRT_MIN" );
  p_sysconf( _SC_SPAWN, "_SC_SPAWN" );
  p_sysconf( _SC_SPIN_LOCKS, "_SC_SPIN_LOCKS" );
  p_sysconf( _SC_SPLIT_CACHE, "_SC_SPLIT_CACHE" );
  p_sysconf( _SC_SPORADIC_SERVER, "_SC_SPORADIC_SERVER" );
  p_sysconf( _SC_SS_REPL_MAX, "_SC_SS_REPL_MAX" );
  p_sysconf( _SC_STACK_PROT, "_SC_STACK_PROT" );
  p_sysconf( _SC_STREAM_MAX, "_SC_STREAM_MAX" );
  p_sysconf( _SC_SYMLOOP_MAX, "_SC_SYMLOOP_MAX" );
  p_sysconf( _SC_SYNCHRONIZED_IO, "_SC_SYNCHRONIZED_IO" );
  p_sysconf( _SC_THREADS, "_SC_THREADS" );
  p_sysconf( _SC_THREAD_ATTR_STACKADDR, "_SC_THREAD_ATTR_STACKADDR" );
  p_sysconf( _SC_THREAD_ATTR_STACKSIZE, "_SC_THREAD_ATTR_STACKSIZE" );
  p_sysconf( _SC_THREAD_CPUTIME, "_SC_THREAD_CPUTIME" );
  p_sysconf( _SC_THREAD_DESTRUCTOR_ITERATIONS, "_SC_THREAD_DESTRUCTOR_ITERATIONS" );
  p_sysconf( _SC_THREAD_KEYS_MAX, "_SC_THREAD_KEYS_MAX" );
  p_sysconf( _SC_THREAD_PRIORITY_SCHEDULING, "_SC_THREAD_PRIORITY_SCHEDULING" );
  p_sysconf( _SC_THREAD_PRIO_INHERIT, "_SC_THREAD_PRIO_INHERIT" );
  p_sysconf( _SC_THREAD_PRIO_PROTECT, "_SC_THREAD_PRIO_PROTECT" );
  p_sysconf( _SC_THREAD_PROCESS_SHARED, "_SC_THREAD_PROCESS_SHARED" );
  p_sysconf( _SC_THREAD_SAFE_FUNCTIONS, "_SC_THREAD_SAFE_FUNCTIONS" );
  p_sysconf( _SC_THREAD_SPORADIC_SERVER, "_SC_THREAD_SPORADIC_SERVER" );
  p_sysconf( _SC_THREAD_STACK_MIN, "_SC_THREAD_STACK_MIN" );
  p_sysconf( _SC_THREAD_THREADS_MAX, "_SC_THREAD_THREADS_MAX" );
  p_sysconf( _SC_TIMEOUTS, "_SC_TIMEOUTS" );
  p_sysconf( _SC_TIMERS, "_SC_TIMERS" );
  p_sysconf( _SC_TIMER_MAX, "_SC_TIMER_MAX" );
  p_sysconf( _SC_TRACE, "_SC_TRACE" );
  p_sysconf( _SC_TRACE_EVENT_FILTER, "_SC_TRACE_EVENT_FILTER" );
  p_sysconf( _SC_TRACE_EVENT_NAME_MAX, "_SC_TRACE_EVENT_NAME_MAX" );
  p_sysconf( _SC_TRACE_INHERIT, "_SC_TRACE_INHERIT" );
  p_sysconf( _SC_TRACE_LOG, "_SC_TRACE_LOG" );
  p_sysconf( _SC_TRACE_NAME_MAX, "_SC_TRACE_NAME_MAX" );
  p_sysconf( _SC_TRACE_SYS_MAX, "_SC_TRACE_SYS_MAX" );
  p_sysconf( _SC_TRACE_USER_EVENT_MAX, "_SC_TRACE_USER_EVENT_MAX" );
  p_sysconf( _SC_TTY_NAME_MAX, "_SC_TTY_NAME_MAX" );
  p_sysconf( _SC_TYPED_MEMORY_OBJECTS, "_SC_TYPED_MEMORY_OBJECTS" );
  p_sysconf( _SC_TZNAME_MAX, "_SC_TZNAME_MAX" );
  p_sysconf( _SC_T_IOV_MAX, "_SC_T_IOV_MAX" );
  p_sysconf( _SC_V6_ILP32_OFF32, "_SC_V6_ILP32_OFF32" );
  p_sysconf( _SC_V6_ILP32_OFFBIG, "_SC_V6_ILP32_OFFBIG" );
  p_sysconf( _SC_V6_LP64_OFF64, "_SC_V6_LP64_OFF64" );
  p_sysconf( _SC_V6_LPBIG_OFFBIG, "_SC_V6_LPBIG_OFFBIG" );
  p_sysconf( _SC_VERSION, "_SC_VERSION" );
  p_sysconf( _SC_XBS5_ILP32_OFF32, "_SC_XBS5_ILP32_OFF32" );
  p_sysconf( _SC_XBS5_ILP32_OFFBIG, "_SC_XBS5_ILP32_OFFBIG" );
  p_sysconf( _SC_XBS5_LP64_OFF64, "_SC_XBS5_LP64_OFF64" );
  p_sysconf( _SC_XBS5_LPBIG_OFFBIG, "_SC_XBS5_LPBIG_OFFBIG" );
  p_sysconf( _SC_XOPEN_CRYPT, "_SC_XOPEN_CRYPT" );
  p_sysconf( _SC_XOPEN_ENH_I18N, "_SC_XOPEN_ENH_I18N" );
  p_sysconf( _SC_XOPEN_LEGACY, "_SC_XOPEN_LEGACY" );
  p_sysconf( _SC_XOPEN_REALTIME, "_SC_XOPEN_REALTIME" );
  p_sysconf( _SC_XOPEN_REALTIME_THREADS, "_SC_XOPEN_REALTIME_THREADS" );
  p_sysconf( _SC_XOPEN_SHM, "_SC_XOPEN_SHM" );
  p_sysconf( _SC_XOPEN_STREAMS, "_SC_XOPEN_STREAMS" );
  p_sysconf( _SC_XOPEN_UNIX, "_SC_XOPEN_UNIX" );
  p_sysconf( _SC_XOPEN_VERSION, "_SC_XOPEN_VERSION" );
  p_sysconf( _SC_XOPEN_XCU_VERSION, "_SC_XOPEN_XCU_VERSION" );

  exit( 0 );
 }

$

# 3  
Old 10-20-2010
Quote:
Originally Posted by thamurali
Any native Solaris commands/scripts to check the utilization of kernel tables/limits in Solaris ? (like equivalent command in HPUX is kcusage)
There is no equivalent single command I'm aware of. Moreover, some of the kernel tunables are handled differently on Solaris 10 and newer. They can be dynamically adjusted instead of being fixed at boot time and can also be different depending on their consumer (eg: project or zone).
Are there specific metrics you would like to check/monitor ?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. HP-UX

How to check overall hard disk utilization in UNIX?

how to check overall hard disk utilization in unix? we use bdf command to find the utilized space for the particular path bdf filepath how can i find overall hard disk utilization? (4 Replies)
Discussion started by: ashwanthfrq
4 Replies

2. Red Hat

Need to check full utilization of my pc RAM - any commands ???

hi guys, I wanted to utilize my PC's full RAM memory to check its performance, for that how can i perform this full RAM utilization with the help of a process or a command in rhel 6. for example, in windows, while checking the harddisk for error (chkdsk - command ) could takes full RAM... (7 Replies)
Discussion started by: redhatlbug
7 Replies

3. Solaris

How to check Utilization of single filesystem

Hi all I am facing high utilization of my root partition. below is the output of df -h bash-3.00# df -h Filesystem size used avail capacity Mounted on /dev/md/dsk/d10 9.9G 9.4G 406M 96% / /devices 0K 0K 0K 0% /devices ctfs ... (13 Replies)
Discussion started by: waqasahsan
13 Replies

4. Shell Programming and Scripting

script to check high cpu utilization for java process

Hello Team, I need help in preparing script to check for high cpu utilisation for java process. I have many java process on my system which consumes high cpu so i have to monitor it using script. ---------- Post updated 12-10-10 at 02:21 AM ---------- Previous update was 12-09-10 at... (1 Reply)
Discussion started by: coolguyamy
1 Replies

5. Solaris

Which file is read by kernel to set its default system kernel parameters values?

Hi gurus Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value Is it /dev/kmem file or something... (1 Reply)
Discussion started by: girish.batra
1 Replies

6. SuSE

How to check Memory Utilization by each process

If following is the usage of cat /proc/meminfo MemTotal: 4051304 kB MemFree: 28544 kB Buffers: 216848 kB Cached: 3398628 kB SwapCached: 0 kB Active: 455460 kB Inactive: 3291612 kB HighTotal: 0 kB HighFree: 0 kB... (5 Replies)
Discussion started by: bryanabhay
5 Replies

7. Shell Programming and Scripting

Check for the Processes in Unix and also CPU utilization

What is the command for checking all the processes running on UNIX. Alos can any one share the CPU utilization script to know what are all the processes running and what is the cpu utilization ... thanks in advance Perla Mohan (3 Replies)
Discussion started by: perlamohan
3 Replies

8. Shell Programming and Scripting

Check space utilization in recursive mode

Hi friends, I have the following query.. Suppose I have the parent directory as /home/suresh/Jobs and assume there are many child ub-directories created within this parent directory I would like to fire a command which will give me the space utilization within each of the child... (1 Reply)
Discussion started by: sureshg_sampat
1 Replies

9. UNIX for Dummies Questions & Answers

kernel parameter values

Hi All Need to find kernel parameter values of our UNIX box. /filesys1/tmp>uname -a HP-UX hps1_dc B.11.11 U 9000/800 1681349356 unlimited-user license /filesys1/CDBLprodrun/tmp> Can anyone help me with the cmd to find kernel parameter values? Thanks in advance. (1 Reply)
Discussion started by: mhbd
1 Replies

10. SCO

How to check CPU Utilization

Hi All, I want to check the CPU Utilization for my SCO UNIX machine. Please suggest some commands to do that. Thanks, Am (2 Replies)
Discussion started by: am_yadav
2 Replies
Login or Register to Ask a Question