[zypp-devel] New tool: zypper-log
Hi, zypper got a now tool called zypper-log (rpm-package also called zypper-log). It can read all logfiles (also the rotated ones), you can query all zypper-runs of a special day, and you can query the complete log of a run providing the pid. # zypper-log Reading /var/log/zypper.log ................ DONE TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log # zypper-log --help usage: zypper-log [-h] [-l FILE] [-r N] [-d YYYY-MM-DD] [PID] This tool helps you to access the zypper logfile. Run this command without any arguments to get a list of your zypper runs. Provide the PID-File of a zypper run as an argument to query the log for this run. positional arguments: PID Get log for this PID optional arguments: -h, --help show this help message and exit -l FILE Read only this file -r N Read N rotated logfiles -d YYYY-MM-DD Get runs for this day The tool is written in python and requires the argparse-modul (which is included in python-base >= 2.7). Dominik -- Dominik Heidler Maxfeldstr. 5, D-90409 Nuernberg, Germany Phone +49-911-74053-141 SUSE LINUX Products GmbH, Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 21284 (AG Nürnberg) _________________________________________ ドミニク -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wednesday 15 June 2011 14:18:40 Dominik Heidler wrote:
# zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Nice command history and may also help to cut down the size of logfiles being attached to a bugreport. IMO deserves a manpage and a reference in 'man zypper' :) -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Am 15.06.2011 14:43, schrieb Michael Andres:
On Wednesday 15 June 2011 14:18:40 Dominik Heidler wrote:
# zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Nice command history and may also help to cut down the size of logfiles being attached to a bugreport. IMO deserves a manpage and a reference in 'man zypper' :)
OK - manpage (and reference) is done. -- Dominik Heidler Maxfeldstr. 5, D-90409 Nuernberg, Germany Phone +49-911-74053-141 SUSE LINUX Products GmbH, Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 21284 (AG Nürnberg) _________________________________________ ドミニク -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
* Dominik Heidler
Hi,
zypper got a now tool called zypper-log (rpm-package also called zypper-log).
It can read all logfiles (also the rotated ones), you can query all zypper-runs of a special day, and you can query the complete log of a run providing the pid.
Way cool !!
# zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Whats the value of having the pid in the output ? Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Am 27.06.2011 10:22, schrieb Klaus Kaempf:
* Dominik Heidler
[Jun 15. 2011 14:18]: Hi,
zypper got a now tool called zypper-log (rpm-package also called zypper-log).
It can read all logfiles (also the rotated ones), you can query all zypper-runs of a special day, and you can query the complete log of a run providing the pid.
Way cool !!
# zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Whats the value of having the pid in the output ?
You need the pid to query the corresponding logs: # zypper-log 114866 Reading /var/log/zypper.log ................ DONE 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] main.cc(main):75 ===== Hi, me zypper 1.6.10 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] main.cc(main):76 ===== 'zypper' 'in' 'manedit-1.1.1-10.62.x86_64.rpm' ===== 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectSystemArchitecture):59 Uname architecture is 'x86_64' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectTextLocale):157 Found LANG=en_US.UTF-8 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectTextLocale):164 Default text locale is 'en_US' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(Impl):272 libzypp: 9.8.1 built Jun 15 2011 11:13:30 2011-06-15 15:22:55 <1> vogelweide(114866) [zypp] IniParser.cc(parse):69 Start parsing /etc/zypp/zypp.conf[g___] 2011-06-15 15:22:55 <1> vogelweide(114866) [zypp] IniParser.cc(parse):119 Done parsing /etc/zypp/zypp.conf[_eF_] 2011-06-15 15:22:55 <1> vogelweide(114866) [Progress++] ProgressData.cc(report):86 {#1|/etc/zypp/zypp.conf}END 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(Impl):475 ZConfig singleton created. 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 libzypp: 9.8.1 built Jun 15 2011 11:13:30 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 satsolver: 0.17.0 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 zypp.conf: '/etc/zypp/zypp.conf' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 TextLocale: 'en_US' (en_US) 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 SystemArchitecture: 'x86_64' (x86_64) 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Zypper.cc(Zypper):76 Zypper instance created. 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] media.h(MediaCallbacks):181 Set media callbacks.. 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Zypper.cc(processGlobalOptions):320 START 2011-06-15 15:22:55 <5> vogelweide(114866) [Measure] Measure.cc(Impl):145 START MEASURE(ReadConfig) 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Augeas.cc(Augeas):21 Going to read zypper config using Augeas... .......
Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany
-- Dominik Heidler Maxfeldstr. 5, D-90409 Nuernberg, Germany Phone +49-911-74053-141 SUSE LINUX Products GmbH, Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer HRB 21284 (AG Nürnberg) _________________________________________ ドミニク -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
Dominik Heidler write:
Am 27.06.2011 10:22, schrieb Klaus Kaempf:
* Dominik Heidler
[Jun 15. 2011 14:18]: Hi,
zypper got a now tool called zypper-log (rpm-package also called zypper-log).
It can read all logfiles (also the rotated ones), you can query all zypper-runs of a special day, and you can query the complete log of a run providing the pid.
Way cool !!
# zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Whats the value of having the pid in the output ?
You need the pid to query the corresponding logs: # zypper-log 114866
sorry, but this looks confusing for me, as PID is not unique, maybe introduce a unique incrementing index number is better solution.
Reading /var/log/zypper.log ................ DONE
2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] main.cc(main):75 ===== Hi, me zypper 1.6.10 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] main.cc(main):76 ===== 'zypper' 'in' 'manedit-1.1.1-10.62.x86_64.rpm' ===== 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectSystemArchitecture):59 Uname architecture is 'x86_64' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectTextLocale):157 Found LANG=en_US.UTF-8 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(_autodetectTextLocale):164 Default text locale is 'en_US' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(Impl):272 libzypp: 9.8.1 built Jun 15 2011 11:13:30 2011-06-15 15:22:55 <1> vogelweide(114866) [zypp] IniParser.cc(parse):69 Start parsing /etc/zypp/zypp.conf[g___] 2011-06-15 15:22:55 <1> vogelweide(114866) [zypp] IniParser.cc(parse):119 Done parsing /etc/zypp/zypp.conf[_eF_] 2011-06-15 15:22:55 <1> vogelweide(114866) [Progress++] ProgressData.cc(report):86 {#1|/etc/zypp/zypp.conf}END 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(Impl):475 ZConfig singleton created. 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 libzypp: 9.8.1 built Jun 15 2011 11:13:30 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 satsolver: 0.17.0 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 zypp.conf: '/etc/zypp/zypp.conf' 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 TextLocale: 'en_US' (en_US) 2011-06-15 15:22:55 <1> vogelweide(114866) [zconfig] ZConfig.cc(ZConfig):569 SystemArchitecture: 'x86_64' (x86_64) 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Zypper.cc(Zypper):76 Zypper instance created. 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] media.h(MediaCallbacks):181 Set media callbacks.. 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Zypper.cc(processGlobalOptions):320 START 2011-06-15 15:22:55 <5> vogelweide(114866) [Measure] Measure.cc(Impl):145 START MEASURE(ReadConfig) 2011-06-15 15:22:55 <1> vogelweide(114866) [zypper] Augeas.cc(Augeas):21 Going to read zypper config using Augeas... .......
Klaus --- SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Maxfeldstraße 5, 90409 Nürnberg, Germany
-- Josef Reidinger Appliance Toolkit team maintaining parts of webyast and SLMS author of rubygems - studio_api and net_observer (coauthor) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Monday 27 June 2011 11:11:59 Josef Reidinger wrote:
Dominik Heidler write:
Am 27.06.2011 10:22, schrieb Klaus Kaempf:
* Dominik Heidler
[Jun 15. 2011 14:18]: # zypper-log Reading /var/log/zypper.log ................ DONE
TIME PID VER CMD 2011-06-09 12:24 7485 1.6.9 zypper in pip 2011-06-09 12:24 7577 1.6.9 zypper in python-pip 2011-06-15 10:09 104050 1.6.9 zypper se foo 2011-06-15 10:15 104587 1.6.9 zypper se argparse 2011-06-15 11:25 112303 1.6.10 zypper rm zypper-log
Whats the value of having the pid in the output ?
You need the pid to query the corresponding logs: # zypper-log 114866
PID may also appear in the zypp/histroy indicating packages selected by the application (although this is mostly used by YaST). But as YaST and zypper logs share the same format, I'd like zypper.log to scan for this as well: genericfrontend.cc(main):668 Launched YaST2 component 'y2base' 'lan' 'ncurses' So it could also be used to process the y2logs.
sorry, but this looks confusing for me, as PID is not unique, maybe introduce a unique incrementing index number is better solution.
Maybe in addition, but not as substitute for PID. For me the PID is the main key when scanning buglogs. It usually is unique enough and if not, '-d YYYY-MM-DD PID' should help. -- cu, Michael Andres +------------------------------------------------------------------+ Key fingerprint = 2DFA 5D73 18B1 E7EF A862 27AC 3FB8 9E3A 27C6 B0E4 +------------------------------------------------------------------+ Michael Andres SUSE LINUX Products GmbH, Development, ma@suse.de GF:Jeff Hawn,Jennifer Guild,Felix Imendörffer, HRB16746(AG Nürnberg) Maxfeldstrasse 5, D-90409 Nuernberg, Germany, ++49 (0)911 - 740 53-0 +------------------------------------------------------------------+ -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (4)
-
Dominik Heidler
-
Josef Reidinger
-
Klaus Kaempf
-
Michael Andres