T.R | Title | User | Personal Name | Date | Lines |
---|
3558.1 | Acknowledged | RDGENG::ddors.reo.dec.com::readings_r | | Tue Apr 29 1997 07:38 | 3 |
| I'm trying to determine the cause of the problem you report and hope to get back to you
soon.
|
3558.1 | In "Steel" | RDGENG::ddors.reo.dec.com::readings_r | | Wed Apr 30 1997 06:37 | 3 |
| PIOCGETU is not currently implemented in Digital UNIX. It will appear in the next
major functional release, code name "Steel", scheduled for early 1998.
|
3558.2 | Trying to use table(TBL_UAREA..) | RDGENG::READINGS_R | Richard Readings | Fri May 02 1997 11:10 | 35 |
| Thanks for your reply. Meanwhile, I was able to get some of the data (from
user-structure) that I was looking for, using the 'table(TBL_UAREA..)'
interface. However, the 'u_rlimit[RLIM_NLIMITS]' field of user structure
does not seem to contain any relevant data on resource limits. I am getting
zeroes for both the maximum and current values.(program is run with
super-user privileges)
Here is a fragment of my program.
.
.
.
(index is a valid pid)
retvalue = table(TBL_UAREA, index, &userinfo, 1, sizeof(userinfo));
if (retvalue < 0)
{
fprintf(stderr, "UAREA table x-face failed: Er= %d\n", errno);
return ;
}
fprintf(stdout, "User Area Sucess\n");
fprintf(stdout, "\t u_logname = %s\n", userinfo.u_logname);
fprintf(stdout, "\t u_ssize = %d\n", userinfo.u_ssize);
fprintf(stdout, "\t u_tsize = %d\n", userinfo.u_tsize);
fprintf(stdout, "\t u_dsize = %d\n", userinfo.u_dsize);
fprintf(stdout, "\t Vol ctxsw = %d\n", userinfo.u_ru.ru_nvcsw);
fprintf(stdout, "\t DataLimCur = %ld\n", userinfo.u_rlimit[RLIMIT_DATA].
rlim_cur);
fprintf(stdout, "\t DataLimMAX = %ld\n", userinfo.u_rlimit[RLIMIT_DATA].
rlim_max);
.
.
.
DataLimCur and DataLimMAX are always zeroes. These fields (of user
structure, holding info on resource controls) are identical on Solaris where
we are able to get these resource limit values.
|
3558.3 | table(TBL_UAREA...) fails to return resource limits | RDGENG::ddors.reo.dec.com::readings_r | | Thu May 08 1997 10:07 | 52 |
| Thanks for your reply. Meanwhile, I was able to get some of the data (from
user-structure) that I was looking for, using the 'table(TBL_UAREA..)'
interface. However, the 'u_rlimit[RLIM_NLIMITS]' field of user structure
does not seem to contain any relevant data on resource limits. I am getting
zeroes for both the maximum and current values.(program is run with
super-user privileges). getrlimit returns the correct values.
-------------------------------- example.c ---------------------------------
#include <stdio.h>
#include <sys/table.h>
#include <sys/user.h>
main()
{
int retvalue;
long cur_proc;
struct rlimit stddata;
struct user userinfo;
/* Get Current Process ID */
cur_proc = getpid();
/* Get UAREA for Current Process */
retvalue = table(TBL_UAREA, cur_proc, &userinfo, 1,
sizeof(userinfo));
if (retvalue < 0)
{
fprintf(stderr, "UAREA interface failed: Error = %d\n",
errno);
return ;
}
/* Limits using TBL_UAREA */
fprintf(stdout, " Limits Using TBL_UAREA For current Process\n");
fprintf(stdout, "\t DataLimCur = %ld",
userinfo.u_rlimit[RLIMIT_DATA].rlim_cur);
fprintf(stdout, "\t DataLimMAX = %ld\n",
userinfo.u_rlimit[RLIMIT_DATA].rlim_max);
/* Limits using getrlimit */
if (getrlimit(RLIMIT_DATA, &stddata) < 0)
{
fprintf(stdout, "\n getrlimit fails: Error is %d\n", errno);
return;
}
fprintf(stdout, "\n Limits Using getrlimit For current Process\n");
fprintf(stdout, "\t Cur = %lu, Max = %lu\n",
stddata.rlim_cur,stddata.rlim_max);
} /* end of main() */
|
3558.4 | QAR # 52918 | RDGENG::ddors.reo.dec.com::readings_r | | Thu May 08 1997 10:08 | 12 |
| The "user" structure doesn't really exist in the kernel. It is
really spread over 3 different structures, uthread, utask and
np_uthread. The routine that pieces this together to create the
"user" structure isn't filling the structure out completely. Looks
like you've found a bug, but fortunately getrlimit provides an
alternative.
Thanks for pointing out the problem and providing a reproducer. I've
QAR'd it with engineering.
QAR # 52918
|
3558.5 | | NNTPD::"[email protected]" | Gerrit Saylor | Thu May 29 1997 17:20 | 47 |
| Date: Thu, 29 May 1997 12:43:13 -0400
To: [email protected]
From: Shyam Harohalli <[email protected]>
Subject: Re: Error Using PIOCGETU ioctl
Cc: [email protected]
Hello Richard,
I think, I have bumped into another problem, this time in proc structure.
My program uses ioctl(fd, PIOCPSINFO, &procstruc) to get info on a
particular process. 'fd' is got from /proc file. 3rd argument 'procstruc'
is structure 'prpsinfo', defined in <sys/procfs.h>.
The controlling terminal for this process, will be "procstruc.pr_ttydev".
I always get this value as "??". Even for processes which have a valid
controling terminal (such as /dev/ttyp4) the value in this field is "??".
Please let me know, if this is an existing problem in prpsinfo.pr_tty
(sys/procfs.h).
Thanks,
Shyam
At 01:56 PM 5/8/97 +0100, you wrote:
>The "user" structure doesn't really exist in the kernel. It is really
>spread over 3 different structures, uthread, utask and np_uthread. The
>routine that pieces this together to create the "user" structure isn't
>filling the structure out completely. Looks like you've found a bug, but
>fortunately getrlimit provides an alternative.
>
>Thanks for pointing out the problem and providing a reproducer. I've
>QAR'd it with engineering.
>
>Richard
>--
>Richard Readings email: [email protected]
>Digital Equipment Co Ltd. tel: +44 (0)118 920 4101
>Reading RG2 0TE fax: +44 (0)118 920 4146
>ENGLAND
>
>
--
Shyam Harohalli
Landmark Systems Corp.
(703) 902 8124
(703) 893-1422 (fax)
[email protected]
[Posted by WWW Notes gateway]
|
3558.6 | closed | RDGENG::newdial_p1.reo.dec.com::readings_r | | Fri Jun 06 1997 05:40 | 4 |
| I first noticed this problem on 3.2. Later, I figured out a mistake in my
program, while getting the device-number from proc table. Now, I am able to
get it succesfully on 4.0. You may go ahead and close this problem. I
appreciate your help.
|