line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Cpuacct; |
2
|
|
|
|
|
|
|
|
3
|
15
|
|
|
15
|
|
108
|
use Mojo::Base -base; |
|
15
|
|
|
|
|
29
|
|
|
15
|
|
|
|
|
114
|
|
4
|
|
|
|
|
|
|
|
5
|
15
|
|
|
15
|
|
2397
|
use constant USAGE_INTERFACE => 'cpuacct.usage'; |
|
15
|
|
|
|
|
32
|
|
|
15
|
|
|
|
|
2491
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
has cgroup => sub { Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new }; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
0
|
202
|
sub usage { shift->cgroup->_list(USAGE_INTERFACE) } |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
1; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=encoding utf-8 |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Mojo::IOLoop::ReadWriteProcess::CGroup::v1::Cpuacct - CGroups v1 Cpuacct Controller. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use Mojo::IOLoop::ReadWriteProcess::CGroup::v1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $cgroup = Mojo::IOLoop::ReadWriteProcess::CGroup::v1->new( name => "test" ); |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
$cgroup->cpuacct->current; |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
This module uses features that are only available on Linux, |
30
|
|
|
|
|
|
|
and requires cgroups and capability for unshare syscalls to achieve pid isolation. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
L inherits all methods from L and implements |
35
|
|
|
|
|
|
|
the following new ones. |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 LICENSE |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Copyright (C) Ettore Di Giacinto. |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
42
|
|
|
|
|
|
|
it under the same terms as Perl itself. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Ettore Di Giacinto Eedigiacinto@suse.comE |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |