HP WebQoS Software manual Sample Process Group Program

Page 36

Sample Programs, Configuration, and Header Files

Sample Process Group Program

switch (argc) { case 1:

USAGE; exit(ERR_RET);

case 2:

cls = atoi(argv[1]); break;

case 3:

tr_on = 1;

cls = atoi(argv[1]); break;

default:

USAGE; exit(ERR_RET);

}

TR printf(“target cls = %d\n”, cls);

TR printf(“original class: %d\n”, wq_get_proc_cls(&err));

ret = wq_set_proc_cls(cls, WQ_SCOPE_PROCESS, &err); if (ret == -1) {

TR printf(“FAIL: ret=%d err%d\n”, ret, err); exit(ERR_RET);

}

TR printf(“wq_set_proc_cls succeeds\n”);

/* test if class has indeed been set as requested */ newcls = wq_get_proc_cls(&err);

TR printf(“class is now %d\n”, newcls); if (cls != newcls) {

printf(“FAILURE: wq_set_proc_cls succeeded, but class is not changed!\n”); TR system(“ps -efPgrep test_scgrep -v grep”);

}

exit(newcls);

}

36

Appendix A

Image 36
Contents HP WebQoS on HP-UX API Programmer’s Guide Legal Notices Page Page Contents Troubleshooting Printing History Page About the WebQoS API Example Initial Service Request Example Subsequent Service RequestsOverview Example Setting the Process Group WebQoSOverview Using the WebQoS API Using the WebQoS API Wqgetsessioncls Error Code Description Return ValueWqsetsessioncls Cls Values Class of Request Cls Value Classification RuleExample Condition or Process Group Return ValueMultithreaded Applications Wqsetproccls Class Values Process GroupUsing the WebQoS API wqsetproccls Troubleshooting Checklist Select the Classification Rules tabRequest Classification Rule Class Error Codes Request Classification Rule Class Error Codes Process Group Error Codes Process Group Error Codes Error Code Wqerrother Error Code WqerrpermissionProcess Group Error Codes Sample Programs, Configuration, and Header Files Sample Session Class Program Sample Process Group Program Sample Process Group Program Svccls.allow Configuration File Webqosapi.h Header File Webqosapi.h Header File Webqosapi.h Header File Index Index Index
Related manuals
Manual 182 pages 33.13 Kb Manual 150 pages 36.15 Kb