1 Usage of CKRM without a classification engine
2 -----------------------------------------------
6 # mkdir /rcfs/taskclass/c1
7 creates a taskclass named c1 , while
8 # mkdir /rcfs/socket_class/s1
9 creates a socketclass named s1
11 The newly created class directory is automatically populated by magic files
12 shares, stats, members, target and config.
14 2. View default shares
16 # cat /rcfs/taskclass/c1/shares
18 "guarantee=-2,limit=-2,total_guarantee=100,max_limit=100" is the default
19 value set for resources that have controllers registered with CKRM.
21 3. change shares of a <class>
23 One or more of the following fields can/must be specified
24 res=<res_name> #mandatory
27 total_guarantee=<number>
30 # echo "res=numtasks,limit=20" > /rcfs/taskclass/c1
32 If any of these parameters are not specified, the current value will be
35 4. Reclassify a task (listening socket)
37 write the pid of the process to the destination class' target file
38 # echo 1004 > /rcfs/taskclass/c1/target
40 write the "<ipaddress>\<port>" string to the destination class' target file
41 # echo "0.0.0.0\32770" > /rcfs/taskclass/c1/target
43 5. Get a list of tasks (sockets) assigned to a taskclass (socketclass)
45 # cat /rcfs/taskclass/c1/members
46 lists pids of tasks belonging to c1
48 # cat /rcfs/socket_class/s1/members
49 lists the ipaddress\port of all listening sockets in s1
51 6. Get the statictics of different resources of a class
53 # cat /rcfs/tasksclass/c1/stats
54 shows c1's statistics for each resource with a registered resource
57 # cat /rcfs/socket_class/s1/stats
58 show's s1's stats for the listenaq controller.
60 7. View the configuration values of the resources associated with a class
62 # cat /rcfs/taskclass/c1/config
63 shows per-controller config values for c1.
65 8. Change the configuration values of resources associated with a class
66 Configuration values are different for different resources. the comman
67 field "res=<resname>" must always be specified.
69 # echo "res=numtasks,parameter=value" > /rcfs/taskclass/c1/config
70 to change (without any effect), the value associated with <parameter>.