ps results - to show user's ps only


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ps results - to show user's ps only
# 8  
Old 10-13-2007
perhaps this might be another solution to have a wrapper to ps.

just have a localized ps which encapsulate /bin/ps and when the user passes the argument aux remap the argument as " x " to /bin/ps

I think this should serve the purpose
# 9  
Old 10-14-2007
Quote:
Originally Posted by matrixmadhan
perhaps this might be another solution to have a wrapper to ps.

just have a localized ps which encapsulate /bin/ps and when the user passes the argument aux remap the argument as " x " to /bin/ps

I think this should serve the purpose
ho this can be done?
# 10  
Old 10-14-2007
2. and also, when I query 'top' it will show active background process from the user's only, not from all users
this is unique, i wonder how this can be done
# 11  
Old 10-14-2007
Code:
       top  [  -bIinqSuv ] [ -dcount ] [ -ofield ] [ -stime ] [ -Uusername ] [
       number ]

Yeah, I wonder that as well. Perhaps the -U option might do something.

Did you save lots of diskspace by not installing the man pages?
# 12  
Old 10-15-2007
Quote:
Originally Posted by porter
Code:
       top  [  -bIinqSuv ] [ -dcount ] [ -ofield ] [ -stime ] [ -Uusername ] [
       number ]

Yeah, I wonder that as well. Perhaps the -U option might do something.

Did you save lots of diskspace by not installing the man pages?
these restriction is usually implemented by shell provider
and I did have a shell, by just typing ps aux and top it will only display the processes from current user and I wonder how do they implement such thing

and yes I know there is option -u / -U but the question is to get the results of ps x and top without displaying results of other users
# 13  
Old 10-15-2007
Quote:
Originally Posted by rdns
and yes I know there is option -u / -U but the question is to get the results of ps x and top without displaying results of other users
Hi, did you read this post at all? What matrixmadhan is suggesting is exactly what you need to do for the ps command. You can do this for the top command too, as suggested (rather forcefully) by porter.
# 14  
Old 10-15-2007
Tools

Quote:
Originally Posted by blowtorch
Hi, did you read this post at all? What matrixmadhan is suggesting is exactly what you need to do for the ps command. You can do this for the top command too, as suggested (rather forcefully) by porter.
thanks buddy for the suggestions
i have figured it out by enabling IPFW and edit this important file:
/etc/sysctl.conf

Quote:
# $FreeBSD: src/etc/sysctl.conf,v 1.8 2003/03/13 18:43:50 mux Exp $
#
# This file is read when going to multi-user and its contents piped thru
# ``sysctl'' to adjust kernel values. ``man 5 sysctl.conf'' for details.
#

# Uncomment this to prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0
and this required a reboot for me for the changes to make effect
and i dont need to recompile any source code or wrapper (which i dont know what it is)
i just login as normal user, hit "ps aux" and "top" and the result will appears for background processes which is belong to me only

thanks for all

Last edited by rdns; 10-16-2007 at 09:26 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Grep command to show the number of results

Hi I wanted to know if there is an option in grep command to show the number of results (not the number of lines of findings). Thanks (14 Replies)
Discussion started by: abdossamad2003
14 Replies

2. Shell Programming and Scripting

I want to add a variable for the results from the formula of one variable and results of another var

Good morning all, This is the file name in question OD_Orders_2019-02-19.csv I am trying to create a bash script to read into files with yesterdays date on the file name while retaining the rest of the files name. I would like for $y to equal, the name of the file with a formula output with... (2 Replies)
Discussion started by: Ibrahim A
2 Replies

3. Red Hat

User is a Part of a Group But Group Details Do Not Show the User

Hi, In the following output you can see the the user "richard" is a member on the team/group "developers": # id richard uid=10247(richard) gid=100361(developers) groups=100361(developers),10053(testers) but in the following details of the said group (developers), the said user... (3 Replies)
Discussion started by: indiansoil
3 Replies

4. Shell Programming and Scripting

Show "uniq -c" results only for more than X occurrences

Say I have test.txt with the following data: user1 mailbox11 IP1 user1 mailbox12 IP2 user2 mailbox21 IP1 user3 mailbox31 IP1 user1 mailbox11 IP1 user1 mailbox11 IP1 user1 mailbox11 IP1 user1 mailbox12 IP2 user2 mailbox21 IP1 user2 mailbox21 IP1 user2 mailbox21 IP1 user2 mailbox21 IP1... (4 Replies)
Discussion started by: striker4o
4 Replies

5. Shell Programming and Scripting

Can ctag and cscope support recording search results and displaying the history results ?

Hello , When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies

6. UNIX for Dummies Questions & Answers

If user has own crontab, results in accumulation of root CRON processes

Hello, I seem to be having a problem with accumulation of root CRON jobs occuring when I have a user's cron job(s) running. Here is an example of a user's crontab file: */1 * * * * echo "hello" > /dev/nullps aux|grep CRON root 14333 0.0 0.0 91236 2172 ? S ... (12 Replies)
Discussion started by: Narnie
12 Replies

7. UNIX for Advanced & Expert Users

Possible to show in which directory a user can write?

Hi Gurus, is there a possibility to show where a user can write to? i want to see all directories where a user has permissions to write to. Kind Regards FranzB (0 Replies)
Discussion started by: FranzB
0 Replies

8. OS X (Apple)

Show operating system, current user & network

I have found an excellent OS X pref pane that allows you to output log files or terminal commands/scripts onto the desktop in the background. What I want to do is create a script that outputs the following... - Mac OS X Version and Build (As shown in the about this mac) - Current username -... (6 Replies)
Discussion started by: digitaljunkie
6 Replies

9. UNIX for Dummies Questions & Answers

show all user account

I have a question about show all create user account. What commend do that thank`s for your help :) (6 Replies)
Discussion started by: Deux
6 Replies
Login or Register to Ask a Question