Code Monkey home page Code Monkey logo

amonagent-legacy's People

Contributors

martinrusev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

amonagent-legacy's Issues

Distro Detection on CentOS 7

This error happens when installing error and running test after the install

 import platform
 print int(float(platform.dist()[1])) Traceback (most recent call last): File "<stdin>",
    line 1, in <module> ValueError: invalid literal for float(): 7.0.1406
 platform.dist() ('centos', '7.0.1406', 'Core')

Properly detect CPU cores

To detect the number of CPU cores, the agent parses the output from /proc/cpuinfo getting the information from the first entry. On some distros /proc/cpuinfo generates individual entries for each core.

processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

icecast@icy-e-bl-01:~$ cat /proc/loadavg
0.83 0.92 0.96 2/137 18345
icecast@icy-e-bl-01:~$ cat proc/cp^C
icecast@icy-e-bl-01:~$ cat  /proc/cpuinfo
processor    : 0
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 1
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 2
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

processor    : 3
vendor_id    : GenuineIntel
cpu family    : 6
model        : 63
model name    : Intel(R) Xeon(R) CPU E5-2630 v3 @ 2.40GHz
stepping    : 2
microcode    : 0x2e
cpu MHz        : 2400.082
cache size    : 20480 KB
physical id    : 0
siblings    : 4
core id        : 0
cpu cores    : 1
apicid        : 0
initial apicid    : 9
fpu        : yes
fpu_exception    : yes
cpuid level    : 15
wp        : yes
flags        : fpu de tsc msr pae cx8 sep cmov pat clflush mmx fxsr sse sse2 ss ht syscall nx lm constant_tsc rep_good nopl pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer f16c rdrand hypervisor lahf_lm abm ida arat epb pln pts dtherm fsgsbase erms
bogomips    : 4800.16
clflush size    : 64
cache_alignment    : 64
address sizes    : 46 bits physical, 48 bits virtual
power management:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.