02-24-2006
Why does the 'ps' command with -u option not working?
How can I use the 'ps' command to view current sessions but only for a given process/user, with the -u parm?
In older versions of Unix, this used to work, but not in Sun Solaris.
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
:confused: In the following, when I enter a valid, existing directory,why am I getting Not Found when the Dir DOES exist?
read auser
echo "You entered $auser"
wait 2
cd /home
if
then
echo "Dir Exists"
sleep 2
else
echo "/home/$auser Not Found"
sleep... (2 Replies)
Discussion started by: rgouette
2 Replies
2. UNIX for Advanced & Expert Users
There r 2 servers. Lets call them S1 and S2..
S1 is OSF1 and S2 is SunOS..
One directory of S2 is mounted on S1. say abc/xyz
There is one application which continuously put xml files in that directory (on S2).
If we give command “ls -lrt” on S2 it gives proper output.. (i.e. gives list... (1 Reply)
Discussion started by: asmita
1 Replies
3. Shell Programming and Scripting
Hi all,
I would like to replace some string in a text file by some string which would contains special characters like "/","\".
I.e. I have a text file with the statement contactperson somewhere in it.
Now I want to replace it by something else which includes special
characters like "/","\"
... (1 Reply)
Discussion started by: shareef
1 Replies
4. HP-UX
Running HP 11.31 on a HP3600. But when I log in as a user the who command works but if I use an option like "who -m" I get nothing. Any thoughts on what is causing this problem. (11 Replies)
Discussion started by: KMRWHUNTER
11 Replies
5. Shell Programming and Scripting
Hi,
I am trying to list all the files created / modified today in a directory.
With reference to this thread,
https://www.unix.com/shell-programming-scripting/20324-capture-all-today-files.html
I have used the below command to list all the files modified today.
find . -daystart -type f... (8 Replies)
Discussion started by: arunkumarmc
8 Replies
6. UNIX for Dummies Questions & Answers
Hi There,
---------
file1
-------
~c asd@ac.com
--------------
Now i am using below command
cat file1|mailx -s " testing" -r " My Name" abc@tech.com (3 Replies)
Discussion started by: Tapan Sharma
3 Replies
7. Shell Programming and Scripting
Hi,
I am trying to find out patterns in file 1 using patterns stored in file 2. Following is the code
FILE1=inputfilename
FILE2=blacklist
blacklist
1203
97715555
20afEOF
egrep -f $FILE2 $FILE1
but the above code is not working either using egrep or grep. Just for your... (10 Replies)
Discussion started by: siramitsharma
10 Replies
8. Shell Programming and Scripting
In solaris, i m trying to find the files having a particulat extension and then from the list i want to exclude those files which is present in a file.
But it seems the -f and -v option are not working
find $source -type f -name $extn | /usr/xpg4/bin/grep -F -v -f $exclude | while read... (7 Replies)
Discussion started by: millan
7 Replies
9. AIX
Hi All,
I am using the following script to run some sql on database but i am not getting the result. When i tried the same by removing "-s" option it is working fine but getting other things as well with my input as shown below. Can anyone please suggest why "-s" option is not working in AIX and... (2 Replies)
Discussion started by: ssk250
2 Replies
10. Shell Programming and Scripting
Can you please figure out what is the issue here
$ find . -maxdepth 1 -type f -size 0 -print
find: bad option -maxdepth
please find the OS details
$ uname -a
HP-UX g5u1216 B.11.31 U ia64 2614088426 unlimited-user license
Use code tags, thanks. (6 Replies)
Discussion started by: TomG
6 Replies
LEARN ABOUT OPENSOLARIS
drv_getparm
drv_getparm(9F) Kernel Functions for Drivers drv_getparm(9F)
NAME
drv_getparm - retrieve kernel state information
SYNOPSIS
#include <sys/ddi.h>
int drv_getparm(unsigned int parm, void *value_p);
INTERFACE LEVEL
Architecture independent level 1 (DDI/DKI).
PARAMETERS
parm The kernel parameter to be obtained. Possible values are:
LBOLT Read the value of lbolt. lbolt is a clock_t that is unconditionally incremented by one at each clock tick. No special treatment
is applied when this value overflows the maximum value of the signed integral type clock_t. When this occurs, its value will be
negative, and its magnitude will be decreasing until it again passes zero. It can therefore not be relied upon to provide an
indication of the amount of time that passes since the last system reboot, nor should it be used to mark an absolute time in the
system. Only the difference between two measurements of lbolt is significant. It is used in this way inside the system kernel for
timing purposes.
PPGRP Read the process group identification number. This number determines which processes should receive a HANGUP or BREAK signal when
detected by a driver.
UPROCP Read the process table token value.
PPID Read process identification number.
PSID Read process session identification number.
TIME Read time in seconds.
UCRED Return a pointer to the caller's credential structure.
value_p A pointer to the data space in which the value of the parameter is to be copied.
DESCRIPTION
Since the release of the Solaris 2.6 operating environment, the drv_getparm() function has been replaced by ddi_get_lbolt(9F),
ddi_get_time(9F), and ddi_get_pid(9F).
The drv_getparm() function verifies that parm corresponds to a kernel parameter that may be read. If the value of parm does not correspond
to a parameter or corresponds to a parameter that may not be read, -1 is returned. Otherwise, the value of the parameter is stored in the
data space pointed to by value_p.
The drv_getparm() function does not explicitly check to see whether the device has the appropriate context when the function is called and
the function does not check for correct alignment in the data space pointed to by value_p. It is the responsibility of the driver writer to
use this function only when it is appropriate to do so and to correctly declare the data space needed by the driver.
RETURN VALUES
The drv_getparm() function returns 0 to indicate success, -1 to indicate failure. The value stored in the space pointed to by value_p is
the value of the parameter if 0 is returned, or undefined if -1 is returned. -1 is returned if you specify a value other than LBOLT, PPGRP,
PPID, PSID, TIME, UCRED, or UPROCP. Always check the return code when using this function.
CONTEXT
The drv_getparm() function can be called from user context only when using PPGRP, PPID, PSID, UCRED, or UPROCP. It can be called from user,
interrupt, or kernel context when using the LBOLT or TIME argument.
SEE ALSO
ddi_get_lbolt(9F), ddi_get_pid(9F), ddi_get_time(9F), buf(9S)
Writing Device Drivers
SunOS 5.11 16 Jan 2006 drv_getparm(9F)