http://oss.sgi.com/bugzilla/show_bug.cgi?id=885
Summary: In pcp-3.1.1 disk.dev.scheduler opens scheduler files
but never closes them.
Product: pcp
Version: unspecified
Platform: All
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: pcp
AssignedTo: mort@xxxxxxx
ReportedBy: emery@xxxxxxx
CC: pcp@xxxxxxxxxxx
Estimated Hours: 0.0
Classification: Unclassified
pmcd died with too many files, set it up to strace by found by adding
following to /etc/init.d/pcp:
### Debug
# $PMCD $OPTS
/usr/bin/strace -o /tmp/pmcd -f -tt -T $PMCD $OPTS &
$RC_STATUS -v
A quick count of open/close disparity can be achieved with:
grep "open(" /tmp/pmcd | wc -l ; grep "close(" /tmp/pmcd | wc -l
Looking at top of trunk:
/pcp/src/pmdas/linux/proc_partitions.c:
361 char *
362 _pm_ioscheduler(const char *device)
363 {
364 FILE *fp;
...
377 sprintf(path, "/sys/block/%s/queue/scheduler", device);
378 if ((fp = fopen(path, "r")) != NULL) {
379 if (!fgets(buf, sizeof(buf), fp))
380 goto unknown;
381 for (p = q = buf; p && *p && *p != ']'; p++) {
382 if (*p == '[')
383 q = p+1;
384 }
385 if (q == buf)
386 goto unknown;
387 if (*p != ']')
388 goto unknown;
389 *p = '\0';
390 return q;
391 }
...
410 unknown:
411 return "unknown";
412 }
fp=fopen() does not have a matching fclose(fp);
--
Configure bugmail: http://oss.sgi.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
|