Difference between pages "Package:Monit" and "CPU FLAGS"

(Difference between pages)
 
 
Line 1: Line 1:
{{Ebuild
+
This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the {{c|CPU_FLAGS_*}} variables.
|Summary=a utility for monitoring and managing daemons or similar programs running on a Unix system.
+
|CatPkg=app-admin/monit
+
|Maintainer=
+
}}
+
[http://mmonit.com/monit/ Monit] is a utility for managing and monitoring processes, programs, files, directories and filesystems on a UNIX system.  
+
  
== Installation ==
+
==CPU_FLAGS_X86 ==
=== Emerge ===
+
To install {{Package|app-admin/monit}}:
+
<console>###i## emerge monit</console>
+
  
== Configuration ==
+
{{TableStart}}
Config file of monit resides in <tt>/etc/monitrc</tt>. And there is a item to specify a config directory. Uncomment if needed.
+
<tr><th>Flag</th><th>Introduced</th><th>Name</th><th></th></tr>
 
+
<tr><td>{{c|mmx}}</td><td>1997 (Pentium MMX)</td><td>MMX</td><td>See [[Wikipedia:MMX (instruction set)]] </td></tr>
{{File|name=/etc/monitrc|desc=config dir|body=
+
<tr><td>{{c|mmxext}}</td><td>1999</td><td>AMD MMX Extensions</td><td>See [[Wikipedia:Extended MMX]]</td></tr>
## It is possible to include additional configuration parts from other files or
+
<tr><td>{{c|sse}}</td><td>1999 (Pentium III)</td><td>Streaming SIMD Extensions (SSE)</td><td>See [[Wikipedia:Streaming SIMD Extensions]]</td></tr>
## directories.
+
<tr><td>{{c|sse2}}</td><td>2001 (Pentium 4)</td><td>Streaming SIMD Extensions 2 (SSE2)</td><td>See [[Wikipedia:SSE2]]</td></tr>
#
+
<tr><td>{{c|sse3}}</td><td>2004 (Pentium 4 Prescott)</td><td>Streaming SIMD Extensions 3 (SSE3/PNI)</td><td>See [[Wikipedia:SSE3]]</td></tr>
#  include /etc/monit.d/*
+
<tr><td>{{c|ssse3}}</td><td>2006 (Core 2 Woodcrest)</td><td>Supplemental Streaming SIMD Extensions 3 (SSSE3)</td><td>See [[Wikipedia:SSSE3]]</td></tr>
#
+
<tr><td>{{c|popcnt}}</td><td>2007</td><td>POPCNT and LZCNT</td><td>See [[Wikipedia:SSE4#POPCNT_and_LZCNT]]</td></tr>
}}
+
{{TableEnd}}
 
+
=== Users ===
+
Users added to the monit or users group will be able to manipulate monit through the web interface.
+
 
+
<console>###i## gpasswd -a $USER monit</console>
+
<console>###i## gpasswd -a $USER users</console>
+
 
+
{{fancywarning|passwords can be streamed to monits web interface, disable it all together after it is setup}}
+
 
+
{{fancyimportant|for security purposes change this entry}}
+
 
+
{{file|name=/etc/monitrc|desc=|body=
+
allow admin:monit}}
+
 
+
== Boot Services ==
+
=== inittab ===
+
{{fancynote|this is the preferred method to run monit}}
+
{{file|name=/etc/inittab|desc=auto restart monit in case of failure|body=
+
ca:12345:ctrlaltdel:/sbin/shutdown -r now
+
 
+
# Run monit in standard runlevels
+
mo:2345:respawn:/usr/bin/monit -Ic /etc/monitrc
+
 
+
# Used by /etc/init.d/xdm to control DM startup.
+
}}
+
 
+
to start monit immediately after changing inittab
+
 
+
<console>###i## telinit q</console>
+
 
+
=== OpenRC ===
+
{{fancynote|prefer inittab method over rc services}}
+
To start the service at boot.
+
<console>###i## rc-update add monit default</console>
+
To start the service immediately.
+
<console>###i## /etc/init.d/monit start</console>
+
 
+
==== Monitoring Monit ====
+
This hourly cron script will check to make sure monit has not crashed.  As this uses pgrep, make sure to not name it monit.
+
 
+
{{file|name=/etc/cron.hourly/moncheck|desc=|body=
+
#!/bin/bash
+
if ! pgrep monit >/dev/null;then
+
rc-service monit restart
+
fi
+
}}
+
 
+
== Pidfile Check ==
+
Monit relies upon pid files. For daemons that do not create a pidfile: a [http://mmonit.com/wiki/Monit/FAQ#pidfile work around] is needed.
+
 
+
== Examples ==
+
=== Auto Restart Mysql ===
+
{{file|name=/etc/monitrc|desc=auto restart mysql|body=
+
check process mysql with pidfile /var/run/mysqld/mysqld.pid
+
    start program = "/bin/bash -c 'rc-service mysql start'"
+
    stop program  = "/bin/bash -c 'rc-service mysql stop'"
+
}}
+
 
+
== Web Interface ==
+
 
+
Navigate to http://localhost:2812/ & login using your edited configuration line or admin / monit if you have not changed it yet.
+
 
+
[[Category:Monitoring]]
+
{{EbuildFooter}}
+

Revision as of 18:55, March 26, 2015

This page lists processor instruction sets that can be enabled on Funtoo Linux systems using the CPU_FLAGS_* variables.

CPU_FLAGS_X86

FlagIntroducedName
mmx1997 (Pentium MMX)MMXSee Wikipedia:MMX (instruction set)
mmxext1999AMD MMX ExtensionsSee Wikipedia:Extended MMX
sse1999 (Pentium III)Streaming SIMD Extensions (SSE)See Wikipedia:Streaming SIMD Extensions
sse22001 (Pentium 4)Streaming SIMD Extensions 2 (SSE2)See Wikipedia:SSE2
sse32004 (Pentium 4 Prescott)Streaming SIMD Extensions 3 (SSE3/PNI)See Wikipedia:SSE3
ssse32006 (Core 2 Woodcrest)Supplemental Streaming SIMD Extensions 3 (SSSE3)See Wikipedia:SSSE3
popcnt2007POPCNT and LZCNTSee Wikipedia:SSE4#POPCNT_and_LZCNT