Sponsored Content
Operating Systems Solaris psrinfo -p needs root login ? Post 302345901 by seg on Thursday 20th of August 2009 01:22:54 PM
Old 08-20-2009
kstat can be run without root privileges. Something as simple as `kstat -p|grep cpu` might work for your needs.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Root login question

Hi all I am administering Linux boxes (running rehat linux 7.3 and 8.0). The other day I tried to ssh from 1 linux box to the other. I was root on the client box. Surprisingly, I could login as root into the host after giving the password!! I am unable to get root login from a SSH client... (2 Replies)
Discussion started by: skotapal
2 Replies

2. Answers to Frequently Asked Questions

Lost root password / Can't login as root

We have quite a few threads about this subject. I have collected some of them and arranged them by the OS which is primarily discussed in the thread. That is because the exact procedure depends on the OS involved. What's more, since you often need to interact with the boot process, the... (0 Replies)
Discussion started by: Perderabo
0 Replies

3. AIX

root login

How do I make it so user "root" can not log directly into an AIX server? I want a user to be able to SU to it but not log into it to keep a log (2 Replies)
Discussion started by: breigner
2 Replies

4. Solaris

psrinfo -v and psradm

Hi Guys, I have T1000 box and here is the output : SunOS t1000 5.10 Generic_118833-20 sun4v sparc SUNW,Sun-Fire-T1000 Here is the output of psrinfo : # psrinfo 0 on-line since 10/02/2006 12:00:06 1 on-line since 10/02/2006 12:00:06 2 off-line since 12/07/2006... (6 Replies)
Discussion started by: sysgate
6 Replies

5. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

6. HP-UX

Cannot login root

With my SSH, my HP-UX cannot login to root. It will come out a message su: unknown id: root. But I can login by user oracle. I also cannot login to console either by using root or oracle anymore. What shall I do. (5 Replies)
Discussion started by: surizan
5 Replies

7. AIX

why I cannot login by root

I can use sudo su to root from my user id through ssh. Also can change root password. However, I cannnot login by root from ssh. Does any body know why? (10 Replies)
Discussion started by: rainbow_bean
10 Replies

8. Solaris

Looking for psrinfo-like command for Memory Modules

I've been looking for, but unable to find, a command/utility that functions kind of like psrinfo but for memory modules. I have Solaris 8 and Solaris 10 boxes. The output of prtdiag in Solaris 8 does not provide the status info for the CPUs and Memory Modules like it does in Solaris 10. Maybe... (1 Reply)
Discussion started by: Vi-Curious
1 Replies

9. Shell Programming and Scripting

login as root user

hello all, if we haven't set a password to root user, how can we login as root user in konsole by using su? is it necessary to set password for root to login as root user?how can we set password to root user? (6 Replies)
Discussion started by: aarathy
6 Replies

10. Red Hat

Su root or login root

Hi, I find there is some customized linux with application. When I use login account root and type the password. It is not allow to login. But if I login with specified user and password. Then I use command "su - " and type root passwd. It allow you to switch to "root" account . Or if i... (14 Replies)
Discussion started by: chuikingman
14 Replies
kstat_read(3KSTAT)					Kernel Statistics Library Functions					kstat_read(3KSTAT)

NAME
kstat_read, kstat_write - read or write kstat data SYNOPSIS
cc [ flag... ] file... -lkstat [ library... ] #include <kstat.h> kid_t kstat_read(kstat_ctl_t *kc, kstat_t *ksp, void *buf); kid_t kstat_write(kstat_ctl_t *kc, kstat_t *ksp, void *buf); DESCRIPTION
The kstat_read() function gets data from the kernel for the kstat pointed to by ksp. The ksp->ks_data field is automatically allocated (or reallocated) to be large enough to hold all of the data. The ksp->ks_ndata field is set to the number of data fields, ksp->ks_data_size is set to the total size of the data, and ksp->ks_snaptime is set to the high-resolution time at which the data snapshot was taken. If buf is non-null, the data is copied from ksp->ks_data to buf. The kstat_write() function writes data from buf, or from ksp->ks_data if buf is NULL, to the corresponding kstat in the kernel. Only the superuser can use kstat_write(). RETURN VALUES
Upon successful completion, kstat_read() and kstat_write() return the current kstat chain ID (KCID). Otherwise, they return -1 and set errno to indicate the error. ERRORS
The kstat_read() and kstat_write() functions will fail if: EACCES An attempt was made to write to a non-writable kstat. EAGAIN The kstat was temporarily unavailable for reading or writing. EINVAL An attempt was made to write data to a kstat, but the number of elements or the data size does not match. ENOMEM Insufficient storage space is available. ENXIO The given kstat could not be located for reading or writing. EOVERFLOW The data for the given kstat was too large to be stored in the structure. EPERM An attempt was made to write to a kstat, but {PRIV_SYS_CONFIG} was not asserted in the effective privilege set. FILES
/dev/kstat kernel statistics driver ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Stable | +-----------------------------+-----------------------------+ |MT-Level |Unsafe | +-----------------------------+-----------------------------+ SEE ALSO
kstat(3KSTAT), kstat_chain_update(3KSTAT), kstat_lookup(3KSTAT), kstat_open(3KSTAT), attributes(5), privileges(5) SunOS 5.11 3 Aug 2004 kstat_read(3KSTAT)
All times are GMT -4. The time now is 12:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy