summaryrefslogtreecommitdiff
path: root/lib/Loadbars/Shared.pm
blob: 79c2229892361eec43a2fc03f0bc9b8e98ed8c8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package Loadbars::Shared;

use Exporter;

use base 'Exporter';

our @EXPORT = qw(
  %PIDS
  %CPUSTATS
  %NETSTATS_LASTUPDATE
  %AVGSTATS
  %AVGSTATS_HAS
  %MEMSTATS
  %MEMSTATS_HAS
  %NETSTATS
  %NETSTATS_HAS
  %NETSTATS_INT
  %C
  %I
);

our %PIDS : shared;

our %CPUSTATS : shared;
our %AVGSTATS : shared;
our %AVGSTATS_HAS : shared;

our %MEMSTATS : shared;
our %MEMSTATS_HAS : shared;

our %NETSTATS : shared;
our %NETSTATS_HAS : shared;
our %NETSTATS_INT : shared;

# Global configuration hash
our %C : shared;

# Global configuration hash for internal settings (not configurable)
our %I : shared;

# Setting defaults
%C = (
    title        => undef,
    barwidth     => 35,
    cpuaverage   => 15,
    extended     => 0,
    hasagent     => 0,
    height       => 230,
    maxwidth     => 1250,
    netaverage   => 15,
    netint       => '',
    netlink      => 'gbit',
    showcores    => 0,
    showmem      => 0,
    shownet      => 0,
    sshopts      => '',
);

%I = (
    cpustring     => 'cpu',
    bytes_mbit    => 125000,
    bytes_10mbit  => 1250000,
    bytes_100mbit => 12500000,
    bytes_gbit    => 125000000,
    bytes_10gbit  => 1250000000,
);