AppSuite:Oxsysreport: Difference between revisions
No edit summary |
No edit summary |
||
Line 155: | Line 155: | ||
= Examples = | = Examples = | ||
== Default | == Default Usage == | ||
<code>root@server# /opt/open-xchange/sbin/oxsysreport</code> | <code>root@server# /opt/open-xchange/sbin/oxsysreport</code> | ||
{{VersionFrom|7.6.0}} | {{VersionFrom|7.6.0}} | ||
=== Example | === Example Output on Debian7=== | ||
<code> | <code> | ||
Debian system detected | Debian system detected | ||
Line 174: | Line 174: | ||
{{VersionFrom|7.6.0}} | {{VersionFrom|7.6.0}} | ||
== Exclude all | == Exclude all Logs Older than Two Days and Remove OX Config Secrets == | ||
<code>root@server# /opt/open-xchange/sbin/oxsysreport --exclude-old-logs 2 --exclude-ox-secrets true</code> | <code>root@server# /opt/open-xchange/sbin/oxsysreport --exclude-old-logs 2 --exclude-ox-secrets true</code> | ||
=== Example | === Example Output on Debian7 === | ||
<code> | <code> | ||
Debian system detected | Debian system detected | ||
Line 193: | Line 193: | ||
{{VersionFrom|7.6.0}} | {{VersionFrom|7.6.0}} | ||
== Create | == Create Thread Dumps, Skip Compression and Include only Todays Logs== | ||
<code>root@server# /opt/open-xchange/sbin/oxsysreport --thread-dump true \ | <code>root@server# /opt/open-xchange/sbin/oxsysreport --thread-dump true \ | ||
Line 199: | Line 199: | ||
--exclude-old-logs 0</code> | --exclude-old-logs 0</code> | ||
=== Example | === Example Output on Debian7=== | ||
<code> | <code> | ||
Debian system detected | Debian system detected | ||
Line 213: | Line 213: | ||
{{VersionFrom|7.6.0}} | {{VersionFrom|7.6.0}} | ||
== Create a | == Create a Heap Dump, Choose a Different Storage Location for the Tarball and Process Data == | ||
<code>root@server# /opt/open-xchange/sbin/oxsysreport --heap-dump true \ | <code>root@server# /opt/open-xchange/sbin/oxsysreport --heap-dump true \ | ||
Line 219: | Line 219: | ||
--log-archive /root/ox_support_infos-$(date +%Y%m%d-%H%M%S).tar.gz</code> | --log-archive /root/ox_support_infos-$(date +%Y%m%d-%H%M%S).tar.gz</code> | ||
=== Example | === Example Output on Debian7 === | ||
<code> | <code> | ||
############################################################################### | ############################################################################### |
Revision as of 12:49, 30 May 2014
The /opt/open-xchange/sbin/oxsysreport
tool will collect a lot of useful log and system information into a tar archive. This so called OX Support Tarball contains Apache and OX configurations, OX logs and system information. This and a qualified error report makes sure that our support department get all needed details for fast effective help. We always recommend to encrypt your e-mail with our Support Key when attaching this tarball.
Parameter Overview
Option | Default Values | Possible Values | Required Tools | |
--tempdir
|
/tmp
|
<path>
|
||
--logdir
|
ox_support_infos-<timestamp>
|
<folder name>
|
||
--log-archive
|
/tmp/ox_support_infos-<timestamp>.tar.gz
|
<path to tarball>
|
||
--keep-tmp-files
|
false
|
true false
|
||
--thread-dump
|
false
|
true false
|
||
--heap-dump
|
false
|
true false
|
jmap, sudo (Only if not IBM Java) | |
--skip-compression
|
false
|
true false
|
||
--exclude-old-logs
|
disabled
|
0 ... n Days
|
||
--exclude-ox-secrets
|
false
|
true false
|
||
-h,--help
|
disabled
|
Required Tools
We recommend to check if all required tools are installed before a incident happens. In case your are running IBM Java on e.g. SUSE Linux Enterprise, heap dumps will be created differently. Please note, we do not list package names which are usually get installed in a default installation.
Tool | Debian | SuSE | Redhead | CentOS | Univention |
bzip2 | bzip2 | ||||
jmap | sun-java<version>-jdk openjdk-<version>-jdk | N/A | java-<version>-openjdk-devel | java-<version>-openjdk-devel | openjdk-<version>-jdk |
sudo | sudo |
Features
Directory for Temporary Process Data (--tempdir
)
If you need by e.g. space limitations to switch to a different drive for collecting and processing the data, you can choose here an alternative but existing path.
Output Log Directory Name (--logdir
)
We do not recommend to use this option, but you can choose the output log directory name of the data collection and processing. This will also be the root folder of the OX Support Tarball. Please note, this tempory folder will be removed by default and you need to choose an not existing directory name.
OX Support Tarball Name and Storage Location (--log-archive
)
By this you can choose an alternative tarball name and storage location. Please note, the script will check and break on already existing file arguments.
Keep Temporary Process Data (--keep-tmp-files
)
If you like to observe the data collection without unpacking the tarball or to add additional files for repacking, feel free to use this option. The path to this directory will be shown by running this tool and is
defined by /<--tempdir>/<--logdir>
.
Create Thread Dumps (--thread-dump
)
This option normaly should only be used in case it is requested by our Support department. The collected thread dumps may help to identify the root cause of long running threads, critical load und very high cpu usage incidents. In case of a very high cpu incident, please keep by the lack of resources the additional usage of --skip-compression
in mind.
Further Details of Thread Dump Creation
This option triggers via 'kill -3
' the thread dump creation and logs the related top output into the '/commands/top -d 3 -bHn 5 (thread-dump)
' file. The thread dump on none IBM Java systems will are stored within the /var/log/open-xchange/open-xchange-console.log
, on IBM Java they will be stored separately inside the support tarball as /tmp/javacore.<timestamp>.txt
.
Create Heap Dumps (--heap-dump
)
This option normaly should only be used in case it is requested by our Support department. The collected heap dumps could be very helpful in memory or OX service outage incidents. Please keep in mind that, you have to call oxsysreport
with this option before restarting the service.
First you will get an warning dialog with some system details and with the choice to proceed or to cancel. While creating Java heap dumps your JVM will be stopped and the OX Service is not functional. This step may
take several minutes and it could happen that you need to restart the open-xchange
service afterwards manually again.
You also have to make sure that you have enough free disk space for processing the data in directories which are defined by --tempdir
and --log-archive
. Depending on your max heap size '-Xmx
' defined by your ox-scriptconf.sh
of your groupware Java Virtual Machine and amount of logs, several gigabyte could be needed!
Further Details of Heap Dump Creation
This option triggers the creation of an heap dump which will be stored on none IBM Java Systems within '/commands/jmap -dump:file (heap-dump).bz2
' and '/commands/jmap -histo (heap-dump)
'. The two jmap files beside without '(heap-dump)
' marker contain the stdout/stderr
of jmap by running this command. Please note, the '.bz2
' suffix (and compression) will be vanished by --skip-compression
option.
On IBM Java Systems the jmap
command is not available and 'kill -ABRT
' will do the job instead. This will kill the JVM completely by writing the heap dump, afterwards the dump will be moved within the tarball and processed by the tool jextract
. Depending on --skip-compression
option jextract will compress it as zip or not. The heap dump will be located /tmp/core.<timestamp>.dmp.zip
within the tarball. The stdout/stderr
of jextract will be written to '/commands/jextract core.<timestamp>.dmp (heap-dump)
'. On IBM Java the OX groupware service will be restarted by this script.
Skip Support Tarball Compression (--skip-compression
)
Please use this option only in case your system is affected by very high cpu usage and the oxsysreport compression stuck by the lack of resources. If this option is set, no compression takes place and this will effect the OX Support Tarball, as well as nested tarballs and possible heap dumps. The resulting tarball can
very huge and we recommend to keep the --exclude-old-logs
option mind to drop also potential outdated logs. Please compress this tarball always before handing over to our support department.
Exclude old OX Logfiles from Support Tarball (--exclude-old-logs
)
We recommend to use this option if you are able to locate the periode of facing a specific issue or by handing over an follow up tarball. This option will exclude all separate files beyond the modified period which are stored on your system in /var/log/open-xchange
or /var/log/univention
. This option does not effect mandatory files like e.g. open-xchange-console.log
. If logs are dropped they are listed in the generated overview file /modified-and-excluded-files.txt
of the tarball.
Remove Confidential Details from OX Config Files (--exclude-ox-secrets
)
This option removes all unexpected, as well as hole confidential known files from the /opt/open-xchange/etc/
copy of the support tarball. Also confidential information like passwords and keys will be replaced by an white and blacklist heuristic with an <REMOVED BY OXSYSREPORT>
marker. The replacement works only on OX properties files and the /modified-and-excluded-files.txt
file will contain the details of affected files.
Examples
Default Usage
root@server# /opt/open-xchange/sbin/oxsysreport
Example Output on Debian7
Debian system detected
Creating temporary log directory: /tmp/ox_support_infos-20140530-074449
Collecting output of system tools into /tmp/ox_support_infos-20140530-074449/commands
Collecting httpd configuration into /tmp/ox_support_infos-20140530-074449/etc/apache2
Collecting Open-Xchange configurations into /tmp/ox_support_infos-20140530-074449/opt/open-xchange/etc
Collecting other system configurations into /tmp/ox_support_infos-20140530-074449/etc
Collecting Open-Xchange logs into /tmp/ox_support_infos-20140530-074449/open-xchange-logs.tar.bz2
Creating an overview about modified and excluded files: /tmp/ox_support_infos-20140530-074449/modified-and-excluded-files.txt
Creating final archive: /tmp/ox_support_infos-20140530-074449.tar.gz
Exclude all Logs Older than Two Days and Remove OX Config Secrets
root@server# /opt/open-xchange/sbin/oxsysreport --exclude-old-logs 2 --exclude-ox-secrets true
Example Output on Debian7
Debian system detected
Creating temporary log directory: /tmp/ox_support_infos-20140530-074504
Collecting output of system tools into /tmp/ox_support_infos-20140530-074504/commands
Collecting httpd configuration into /tmp/ox_support_infos-20140530-074504/etc/apache2
Collecting Open-Xchange configurations into /tmp/ox_support_infos-20140530-074504/opt/open-xchange/etc
Removing secrets from Open-Xchange configurations: /tmp/ox_support_infos-20140530-074504/opt/open-xchange/etc
Collecting other system configurations into /tmp/ox_support_infos-20140530-074504/etc
Collecting Open-Xchange logs into /tmp/ox_support_infos-20140530-074504/open-xchange-logs.tar.bz2
Creating an overview about modified and excluded files: /tmp/ox_support_infos-20140530-074504/modified-and-excluded-files.txt
Creating final archive: /tmp/ox_support_infos-20140530-074504.tar.gz
Create Thread Dumps, Skip Compression and Include only Todays Logs
root@server# /opt/open-xchange/sbin/oxsysreport --thread-dump true \
--skip-compression true \
--exclude-old-logs 0
Example Output on Debian7
Debian system detected
Creating temporary log directory: /tmp/ox_support_infos-20140530-074517<
Collecting output of system tools into /tmp/ox_support_infos-20140530-074517/commands
Collecting httpd configuration into /tmp/ox_support_infos-20140530-074517/etc/apache2
Collecting Open-Xchange configurations into /tmp/ox_support_infos-20140530-074517/opt/open-xchange/etc
Collecting other system configurations into /tmp/ox_support_infos-20140530-074517/etc
Creating Java thread dumps: 1 2 3 4 5
Collecting Open-Xchange logs into /tmp/ox_support_infos-20140530-074517/open-xchange-logs.tar
Creating an overview about modified and excluded files: /tmp/ox_support_infos-20140530-074517/modified-and-excluded-files.txt
Creating final archive: /tmp/ox_support_infos-20140530-074517.tar
Create a Heap Dump, Choose a Different Storage Location for the Tarball and Process Data
root@server# /opt/open-xchange/sbin/oxsysreport --heap-dump true \
--tempdir /var/tmp/ \
--log-archive /root/ox_support_infos-$(date +%Y%m%d-%H%M%S).tar.gz
Example Output on Debian7
###############################################################################
WARNING
While creating Java heap dumps your JVM will be stopped and the OX Service is
not functional. This step may take several minutes and it could happen that you
need to restart the open-xchange service afterwards manually again.
Please also make sure that you have enough free disk space for processing the
data in directories which are defined by '--tempdir' and '--log-archive',
depending on your ox-scriptconf.sh '-Xmx' size of your groupware Java virtual
machine and amount of logs, several gigabyte could be needed!
System Info:
Groupware Max Heap Size: -Xmx1024m
OX Log Storage: 2.5M /var/log/open-xchange
Filesystem Size Used Avail Use% Mounted on
/dev/sdb1 500G 100G 400G 20% /var Processing data within: /var/tmp/ox_support_infos-20140530-081700
/dev/sdc1 500G 50G 450G 10% /root Final tarball storage: /root/ox_support_infos-20140530-081700.tar.gz
###############################################################################
Press ENTER to continue or [ctrl+c] to cancel...
Debian system detected
Creating temporary log directory: /var/tmp/ox_support_infos-20140530-081700
Collecting output of system tools into /var/tmp/ox_support_infos-20140530-081700/commands
Collecting httpd configuration into /var/tmp/ox_support_infos-20140530-081700/etc/apache2
Collecting Open-Xchange configurations into /var/tmp/ox_support_infos-20140530-081700/opt/open-xchange/etc
Collecting other system configurations into /var/tmp/ox_support_infos-20140530-081700/etc
Creating Java heap dump of Open-Xchange groupware...
Dumping heap to /var/tmp/ox_support_infos-20140530-081700/commands/jmap -dump:file (heap-dump) ...
Heap dump file created
Compressing Java heap dump: /var/tmp/ox_support_infos-20140530-081700/commands/jmap -dump:file (heap-dump).bz2
Collecting Open-Xchange logs into /var/tmp/ox_support_infos-20140530-081700/open-xchange-logs.tar.bz2
Creating an overview about modified and excluded files: /var/tmp/ox_support_infos-20140530-081700/modified-and-excluded-files.txt
Creating final archive: /root/ox_support_infos-20140530-081700.tar.gz