Sponsored Content
Full Discussion: Processes and Users
Top Forums Shell Programming and Scripting Processes and Users Post 302138805 by vgersh99 on Wednesday 3rd of October 2007 01:24:27 PM
Old 10-03-2007
'junk' is just a placeholder for fields in the '/etc/passwd' file we/you want to skip reading.
Make sure you copy/paste the code 'as-is' - you seem to be refering to 'useID' and not 'userID' as it's used in the code snippet.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Users and processes

Hi All, I am trying to write a script to list all users and their processes. I cant seem to find out how to link the PID to the user. For example if i run ps -a I get a nice list of all the processes running and their PID, but no information about which user is running them. If i use w i... (17 Replies)
Discussion started by: Chiefos
17 Replies

2. Shell Programming and Scripting

Displaying the processes of users

Hi guys, I'm writing a script to display all the current logged on users and the processes they're running, output to a file. The output will look similar to this: User1 (Real name not login name) PID TTY TIME CMD 3179 pts/3 00:00:00 vim User2 PID TTY TIME ... (2 Replies)
Discussion started by: olimiles
2 Replies

3. Shell Programming and Scripting

i need a scipt to email users with idle processes!?

hello, i am VERY new to this whole script world. I need to come up with a script that will email a user if they have an idle process past 500 minutes...any suggestions??? Thanks so much. (0 Replies)
Discussion started by: sheppy28
0 Replies

4. UNIX for Dummies Questions & Answers

users and there processes

I am trying to write a script to list all users and their processes. I cant seem to find out how to link the PID to the user. For example if i run ps -a I get a nice list of all the processes running and their PID, but no information about which user is running them. I need the users real name not... (3 Replies)
Discussion started by: iago
3 Replies

5. UNIX for Advanced & Expert Users

Monitoring Processes - Killing hung processes

Is there a way to monitor certain processes and if they hang too long to kill them, but certain scripts which are expected to take a long time to let them go? Thank you Richard (4 Replies)
Discussion started by: ukndoit
4 Replies

6. Shell Programming and Scripting

printing each users by processes

hello All, i am trying to get the each users by with thier processing. I have try it in several ways but i am not getting thier my code is #!bin/bash/ users=`cat /etc/passwd | cut -d':' -f5` onlineusers=`users | tr '.' ' '` $onlineusers | while read `$users` do echo `ps -U $users`... (12 Replies)
Discussion started by: sam4now
12 Replies

7. Solaris

Identifying and grouping OS processes and APP processes

Hi Is there an easy way to identify and group currently running processes into OS processes and APP processes. Not all applications are installed as packages. Any free tools or scripts to do this? Many thanks. (2 Replies)
Discussion started by: wilsonee
2 Replies

8. Shell Programming and Scripting

How to display what processes, users have opened at a given time

Hello, What i have to do is make a top 10 list of users sorted by the number of processes opened at a given time. Can anyone help me with finding out for a given moment, for all users how many processes each had opened? (5 Replies)
Discussion started by: gabibyte
5 Replies

9. Shell Programming and Scripting

Sorting the users logged in according to the number of processes

Is it possible to get a list of users sorted by the number of processes executed by each. I have a HP - UX server with 2800 processes running currently. And I want to know the number of processes owned by each person logged in to that server.something like below: user1 : 150 Processes user2 :... (2 Replies)
Discussion started by: engineer
2 Replies

10. Homework & Coursework Questions

Display info about users (UID GID processes terminal)

I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made. 1. The problem statement, all variables and given/known data: The task is to create a script which prints information about users whose names are specified in the... (2 Replies)
Discussion started by: kornfan
2 Replies
quota(1)						      General Commands Manual							  quota(1)

NAME
quota - displays disk usage and limits SYNOPSIS
quota [-agGuUqv] quota [-a] [-g] [groupname] [-qv] quota [-a] [-G] [groupID] [-qv] quota [-a] [-u] [username] [-qv] quota [-a] [-U] [userID] [-qv] OPTIONS
Displays quota information for all mounted file systems: those in the /etc/fstab file and those mounted manually or with automount. The -q option takes precedence over the -a option. When specified without the groupname argument, displays group quotas for groups of which you are a member. Displays group quotas for the group when you specify groupname. When specified without the groupID argument, displays group quotas for groups of which you are a member. Displays group quotas for the group when you specify groupID. Displays only your user quotas (the default) when specified without the username argument. Displays user quotas for the user when you specify username. Displays only your user quotas (the default) when specified without the userID argument. Displays user quotas for the user when you specify userID. Displays information only for file systems that have disk quotas and where usage is over quota. Takes precedence over the -v and -a options. Displays quota information for all mounted file systems that are specified in the /etc/fstab file. Quota information is dis- played for each file system whether or not quotas are enabled for it. The -q option takes precedence over the -v option. DESCRIPTION
The quota command displays disk space usage and limits. Disk quotas are displayed as 1 kilobyte blocks. By default, only your user quotas are displayed. If you use the -g or the -G option without an argument, the quota command displays group quotas for groups of which you are a member. Unless you use the -v option, the quota command reports only on file systems listed in /etc/fstab that have disk quotas and under which you have files. If quota exits with a status of 1, one or more file systems are over quota. If quota exits with a status of 2, there are sys- tem errors. NOTES
The term file system represents either a UFS file system or an AdvFS fileset. Do not use both a user and a group option in the same command. RESTRICTIONS
You must be the root user to use the optional username or userID argument to view information about another user, or to use the optional groupname or groupID argument to view information about a group to which you do not belong. FILES
Contains user quotas for each file system. Contains group quotas for each file system. Contains file system names and locations. SEE ALSO
edquota(8), quot(8), quotacheck(8), quotaon(8), quotaoff(8), repquota(8), quotactl(2), fstab(4) quota(1)
All times are GMT -4. The time now is 08:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy