Sponsored Content
Full Discussion: getgroups usage on linux
Top Forums Programming getgroups usage on linux Post 302517852 by fatshaw on Thursday 28th of April 2011 02:17:34 AM
Old 04-28-2011
getgroups usage on linux

hi , I have a problem about getgroups usage on linux. getgroups can get supplementary groups of a process but if i run a process with root account and I want to get supplementary groups of nobody then what i should do to realize that.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Linux diskspace usage

when /var directory of my machine gets filled up (85%) i removed some old logs. but after cleaning df -k command still shows that /var is still 85% full. It can detect the actual disk space only after I restart the machine. Is there a way to force df to reflect actual free space without... (1 Reply)
Discussion started by: necro
1 Replies

2. Red Hat

Linux memory usage

What's the best way to find out how much memory is being used/available? I tried using free, but I didn't quite understand the output. Can someone explain it? $ free total used free shared buffers cached Mem: 16304536 16256376 48160 0 ... (6 Replies)
Discussion started by: junkmail426
6 Replies

3. Linux

Linux Mem Usage

What is amount of free RAM i have now? total used free shared buffers cached Mem: 1010 963 46 0 215 256 -/+ buffers/cache: 491 518 Swap: 1983 0 1983 Above is the output of... (1 Reply)
Discussion started by: new2ss
1 Replies

4. HP-UX

how can I find cpu usage memory usage swap usage and logical volume usage

how can I find cpu usage memory usage swap usage and I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times my final destination is monitor process logical volume usage above X % and number of Logical voluage above can I not to... (3 Replies)
Discussion started by: alert0919
3 Replies

5. UNIX for Dummies Questions & Answers

Memory Usage on Linux server

Hi , As I am new to Linux server, I am facing some doubts like: On linux server virtual memory usage goes to 99%, but I have Threshold limit of 95%. So it crossed the threshold limit and alarmd. Yesterday I moniterd the server using TOP command, and found some of Tibco process was consuming... (1 Reply)
Discussion started by: Jaywantmm
1 Replies

6. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

7. Linux

Internet Usage Monitor for Linux

I have installed Ubuntu and i want to monitor the internet usage. Is there any software for linux for monitoring the internet usage? (preferabaly opensource) (1 Reply)
Discussion started by: vkca
1 Replies

8. Shell Programming and Scripting

Script for CPU usage -Linux

Hi all I was wondering if its possible to write a script to keep CPU usage at 90%-95%? for a single cpu linux server? I have a perl script I run on servers with multple cpu's and all I do is max all but one cpu to get into the 90'% utilised area. I now need a script that raises the CPU to... (4 Replies)
Discussion started by: sudobash
4 Replies

9. Shell Programming and Scripting

Linux Application Memory usage

Hello We are in the process of migrating few of our applications in our linux boxes to new linux box to streamline our applications . In this context , i would like to know how we can calculate a particular application is used .? This data will then be used to select which applications need... (7 Replies)
Discussion started by: ron5174
7 Replies

10. UNIX for Advanced & Expert Users

OpenSSL usage on Linux Distros

Hi, My server is Centos 6 i686. Is it possible get an openssl download from this site "https://www.openssl.org/source/" (which is used for 64 bit platforms) and use it on 32 bit platforms also? Thx, Aigini (5 Replies)
Discussion started by: anaigini45
5 Replies
GETGROUPS(2)						      BSD System Calls Manual						      GETGROUPS(2)

NAME
getgroups -- get group access list SYNOPSIS
#include <unistd.h> int getgroups(int gidsetsize, gid_t grouplist[]); DESCRIPTION
getgroups() gets the current group access list of the current user process and stores it in the array grouplist[]. The parameter gidsetsize indicates the number of entries that may be placed in grouplist[]. getgroups() returns the actual number of groups returned in grouplist[]. However, no more than {NGROUPS_MAX} will be returned. If gidsetsize is 0, getgroups() returns the number of groups without modifying the grouplist[] array. Calling initgroups(3) to opt-in for supplementary groups will cause getgroups() to return a single entry, the GID that was passed to initgroups(3). To provide compatibility with applications that use getgroups() in environments where users may be in more than {NGROUPS_MAX} groups, a vari- ant of getgroups(), obtained when compiling with either the macros _DARWIN_UNLIMITED_GETGROUPS or _DARWIN_C_SOURCE defined, can be used that is not limited to {NGROUPS_MAX} groups. However, this variant only returns the user's default group access list and not the group list modi- fied by a call to setgroups(2) (either in the current process or an ancestor process). Use of setgroups(2) is highly discouraged, and there is no foolproof way to determine if it has been previously called. RETURN VALUES
A successful call returns the number of groups in the group set. Otherwise, a value of -1 is returned and the global integer variable errno is set to indicate the error. ERRORS
The possible errors for getgroups() are: [EFAULT] The argument grouplist specifies an invalid address. [EINVAL] The argument gidsetsize, although non-zero, is smaller than the number of groups in the group set. LEGACY SYNOPSIS
#include <sys/param.h> #include <sys/types.h> #include <unistd.h> The include files <sys/param.h> and <sys/types.h> are necessary. SEE ALSO
setgroups(2), initgroups(3), compat(5) HISTORY
The getgroups() function call appeared in 4.2BSD. 4.2 Berkeley Distribution October 28, 2011 4.2 Berkeley Distribution
All times are GMT -4. The time now is 07:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy