diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-07-22 17:27:27 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-07-22 17:27:27 +0200 |
commit | d423c25a3feeb88f25d5ec52363f990d4fc22c71 (patch) | |
tree | 760b584d6bd8d395c0567537bf5db9a12e6a412e /examples | |
parent | f78a65379ce2227d714ce6315e05fbbd1aa73f9d (diff) |
tests: add some more docs
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test-cgroups.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/test-cgroups.c b/examples/test-cgroups.c index dcd700b..0a38916 100644 --- a/examples/test-cgroups.c +++ b/examples/test-cgroups.c @@ -17,6 +17,29 @@ * Boston, MA 02110-1301, USA. */ +/* Runs a pipeline and clasifies the media pipelines based on the + * authenticated user. + * + * This test requires 2 cpu cgroups to exist named 'user' and 'admin'. + * The rtsp server should have permission to add its threads to the + * cgroups. + * + * sudo cgcreate -t uid:gid -g cpu:/user + * sudo cgcreate -t uid:gid -g cpu:/admin + * + * With -t you can give the user and group access to the task file to + * write the thread ids. The user running the server can be used. + * + * Then you would want to change the cpu shares assigned to each group: + * + * sudo cgset -r cpu.shares=100 user + * sudo cgset -r cpu.shares=1024 admin + * + * Then start clients for 'user' until the stream is degraded because of + * lack of CPU. Then start a client for 'admin' and check that the stream + * is not degraded. + */ + #include <libcgroup.h> #include <gst/gst.h> |