--- pidstat.c.orig 2011-11-21 00:38:04.000000000 +0900 +++ pidstat.c 2011-12-07 12:58:58.917690324 +0900 @@ -306,16 +306,25 @@ int read_proc_pid_stat(unsigned int pid, /* No such process */ return 1; - sprintf(format, "%%*d (%%%ds %%*s %%*d %%*d %%*d %%*d %%*d %%*u %%lu %%lu" - " %%lu %%lu %%lu %%lu %%lu %%lu %%*d %%*d %%u %%*u %%*d %%lu %%lu" - " %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u %%*u" - " %%*u %%u %%*u %%*u %%*u %%lu %%lu\\n", MAX_COMM_LEN); + sprintf(format, + "%%*d (%%%ds %%*s %%*d %%*d" + " %%*d %%*d %%*d %%*u %%lu" + " %%lu %%lu %%lu %%lu %%lu" + " %%lu %%lu %%*d %%*d %%u" + " %%*u %%*d %%lu %%lu %%*u" + " %%*u %%*u %%*u %%*u %%*u" + " %%*u %%*u %%*u %%*u %%*u" + " %%*u %%*u %%*u %%u %%*u" + " %%*u %%*u\\n", MAX_COMM_LEN); + // " %%*u %%*u %%lu %%lu\\n", MAX_COMM_LEN); fscanf(fp, format, comm, &pst->minflt, &pst->cminflt, &pst->majflt, &pst->cmajflt, &pst->utime, &pst->stime, &pst->cutime, &pst->cstime, - thread_nr, &pst->vsz, &pst->rss, &pst->processor, - &pst->gtime, &pst->cgtime); + thread_nr, &pst->vsz, &pst->rss, &pst->processor); + //&pst->gtime, &pst->cgtime); + //thread_nr, &pst->vsz, &pst->rss, &pst->processor, + //&pst->gtime, &pst->cgtime); fclose(fp);