starce it, that might spot the issue.
Zaid
On 4/5/07, Ala'a Ibrahim <[EMAIL PROTECTED]> wrote:
> it's not even in the top, all what is in the top is httpd, mysqld, top,
> rsync
> also the application doesn't take that long i.e running time on the command
>
> root user (works fine):
> real 0m0.097s
> user 0m0.001s
> sys 0m0.059s
>
> another user (faulty):
> real 0m0.040s
> user 0m0.001s
> sys 0m0.031s
>
>
> On 4/5/07, Khamis Siksek < [EMAIL PROTECTED]> wrote:
> > The 2GB memory is free while your readdir is running?
> > run readdir and top (to monitor the system), check readdir status in top
> and send us a snapshot of it.
> >
> >
> >
> > On 4/5/07, Ala'a Ibrahim <[EMAIL PROTECTED]> wrote:
> > > root:
> > > core file size (blocks, -c) 0
> > > data seg size (kbytes, -d) unlimited
> > > file size (blocks, -f) unlimited
> > > pending signals (-i) 1024
> > > max locked memory (kbytes, -l) 32
> > > max memory size (kbytes, -m) unlimited
> > > open files (-n) 1024
> > > pipe size (512 bytes, -p) 8
> > > POSIX message queues (bytes, -q) 819200
> > > stack size (kbytes, -s) 10240
> > > cpu time (seconds, -t) unlimited
> > > max user processes (-u) 74752
> > > virtual memory (kbytes, -v) unlimited
> > > file locks (-x) unlimited
> > > the other user:
> > > core file size (blocks, -c) 0
> > > data seg size (kbytes, -d) unlimited
> > > file size (blocks, -f) unlimited
> > > pending signals (-i) 1024
> > > max locked memory (kbytes, -l) 32
> > > max memory size (kbytes, -m) unlimited
> > > open files (-n) 1024
> > > pipe size (512 bytes, -p) 8
> > > POSIX message queues (bytes, -q) 819200
> > > stack size (kbytes, -s) 10240
> > > cpu time (seconds, -t) unlimited
> > > max user processes (-u) 74752
> > > virtual memory (kbytes, -v) unlimited
> > > file locks (-x) unlimited
> > >
> > > they are identical
> > >
> > >
> > >
> > > On 4/5/07, Yaman Saqqa <[EMAIL PROTECTED]> wrote:
> > > > Do you mind sending the output of `ulimit -a` ran once as root and
> once as the user you're running the code with.
> > > >
> > > >
> > > >
> > > > On 4/5/07, Ala'a Ibrahim < [EMAIL PROTECTED]> wrote:
> > > > > thanks Yaman,
> > > > > the error code it's returning is 12, which is Cannot allocate
> memory.
> > > > > I checked the ram there is 2 GB free there, and the folder is not
> that huge.
> > > > >
> > > > >
> > > > >
> > > > > On 4/5/07, Yaman Saqqa <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Let's start by modifying the code to check errno after the NULL
> returns to figure out what exactly is the error.
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 4/5/07, Ala'a Ibrahim < [EMAIL PROTECTED]> wrote:
> > > > > > > Hi All,
> > > > > > > I'm having this problems, a couple of days ago, one of the
> servers started to have some problems with readdir, I've written this code
> to test:
> > > > > > > #include <sys/types.h>
> > > > > > > #include <dirent.h>
> > > > > > > #include <string.h>
> > > > > > > #include <stdlib.h>
> > > > > > > #include <stdio.h>
> > > > > > >
> > > > > > > int thruDirectories (char *dirName) {
> > > > > > > DIR *directory;
> > > > > > > struct dirent *fileData;
> > > > > > > char newdirname[5000] = "";
> > > > > > > size_t leng;
> > > > > > > directory = opendir(dirName);
> > > > > > > while(fileData = readdir(directory)) {
> > > > > > > if(fileData->d_name[0] == '.') {
> > > > > > > continue;
> > > > > > > }
> > > > > > > if(fileData->d_type == 4) {
> > > > > > > leng = strlen(dirName) + strlen(fileData->d_name) +
> 2;
> > > > > > > newdirname[0]='\0';
> > > > > > > strcat(newdirname,dirName);
> > > > > > > strcat(newdirname,"/");
> > > > > > >
> strcat(newdirname,fileData->d_name);
> > > > > > > fprintf(stderr,"dirname is %s\n" ,newdirname);
> > > > > > > thruDirectories(newdirname);
> > > > > > > continue;
> > > > > > > }
> > > > > > >
> fprintf(stderr,"%s/%s\n",dirName,fileData->d_name );
> > > > > > > }
> > > > > > > closedir(directory);
> > > > > > > return 0;
> > > > > > > }
> > > > > > >
> > > > > > > main() {
> > > > > > > thruDirectories("Desktop");
> > > > > > > }
> > > > > > >
> > > > > > > this code is supposed to go through a directory, parse it's
> print it's content, if it's a directory, recursively parse it again.
> > > > > > > now if you are root, everything works fine.
> > > > > > > any other user, some of the subdirectories would not get parsed
> due to that readdir is returning NULL the first time it gets in (it even
> doesn't get the '.' and '..' folders).
> > > > > > >
> > > > > > > and yes I've checked the files permissions, ulimit, glibc, and
> now I'm out of ideas. and the problem only started a couple of days ago, it
> was running fine before. running the original code on other servers doesn't
> have a problem
> > > > > > > anybody have a clue ... please help me out. as now the only
> solution I have is to back up the server, and reinstall Linux, and I'm
> hoping not to reach that point.
> > > > > > >
> > > > > > > --
> > > > > > > Ala'a A.
> Ibrahim
> > > > > > > http://guru.alaa-ibrahim.com/
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > abulyomon
> > > > > >
> > > > > > www.KiLLTHeUPLiNK.com
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Ala'a A. Ibrahim
> > > > > http://guru.alaa-ibrahim.com/
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > abulyomon
> > > >
> > > > www.KiLLTHeUPLiNK.com
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Ala'a A. Ibrahim
> > > http://guru.alaa-ibrahim.com/
> > >
> > >
> > >
> >
> >
> >
> > --
> >
> > Khamis Siksek
> > http://saksoook.blogspot.com
> >
> >
> >
>
>
>
> --
> Ala'a A. Ibrahim
> http://guru.alaa-ibrahim.com/
> >
>
--
---------------------------
Netiquette -> http://www.dtcc.edu/cs/rfc1855.html
Netiquette Nazi ->
http://redwing.hutman.net/%7Emreed/warriorshtm/netiquettenazi.htm
---------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Jolug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Jolug?hl=en-GB
-~----------~----~----~----~------~----~------~--~---