aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/accounting/getdelays.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2007-05-08 03:30:13 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:15:11 -0400
commitf16825bbeb9e6e0970531aa2f21b18b2e8ae9e47 (patch)
tree67e983668058833671d337b6eb92d61179ee2b85 /Documentation/accounting/getdelays.c
parent9e860d000a90cfc9ca270ddb6e99b177e6aa91cd (diff)
Taskstats: fix getdelays usage information
Add usage to getdelays.c. This patch was originally posted by Randy Dunlap http://lkml.org/lkml/2007/3/19/168 Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Balbir Singh <balbir@in.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/accounting/getdelays.c')
-rw-r--r--Documentation/accounting/getdelays.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
index e9126e794ed7..6207e2f59e3b 100644
--- a/Documentation/accounting/getdelays.c
+++ b/Documentation/accounting/getdelays.c
@@ -72,6 +72,16 @@ struct msgtemplate {
72 72
73char cpumask[100+6*MAX_CPUS]; 73char cpumask[100+6*MAX_CPUS];
74 74
75static void usage(void)
76{
77 fprintf(stderr, "getdelays [-dilv] [-w logfile] [-r bufsize] "
78 "[-m cpumask] [-t tgid] [-p pid]\n");
79 fprintf(stderr, " -d: print delayacct stats\n");
80 fprintf(stderr, " -i: print IO accounting (works only with -p)\n");
81 fprintf(stderr, " -l: listen forever\n");
82 fprintf(stderr, " -v: debug on\n");
83}
84
75/* 85/*
76 * Create a raw netlink socket and bind 86 * Create a raw netlink socket and bind
77 */ 87 */
@@ -227,7 +237,7 @@ int main(int argc, char *argv[])
227 struct msgtemplate msg; 237 struct msgtemplate msg;
228 238
229 while (1) { 239 while (1) {
230 c = getopt(argc, argv, "diw:r:m:t:p:v:l"); 240 c = getopt(argc, argv, "diw:r:m:t:p:vl");
231 if (c < 0) 241 if (c < 0)
232 break; 242 break;
233 243
@@ -277,7 +287,7 @@ int main(int argc, char *argv[])
277 loop = 1; 287 loop = 1;
278 break; 288 break;
279 default: 289 default:
280 printf("Unknown option %d\n", c); 290 usage();
281 exit(-1); 291 exit(-1);
282 } 292 }
283 } 293 }