Skip to content
This repository was archived by the owner on Nov 11, 2018. It is now read-only.
This repository was archived by the owner on Nov 11, 2018. It is now read-only.

Access to oldest log (fix proposed) - Ubuntu 16.04 #4

@gustawdaniel

Description

@gustawdaniel

Hi

Your script is AWESOME! But today I was confused by short time of history displayed in program. I fixed it. Please look at the screen.

  • On the right side is version that use oldest logs - with my modification.
  • On the left side is version from this repository - original version.

rawhen_fix

Command wc /var/log/wtpm* calculates lines of files with temporal log this month wtmp and oldest wtmp.1.

My fixture is simple and changes line:

163 | command = "last -R -F reboot"

to

163 | command = "last -R -F reboot -f /var/log/wtmp.1"

In your docs I see that by "last -R -F reboot" you have access to 83 days of history. But It was 4 years ago. Probably somethings was changed in logging mechanisms of Ubuntu. My fix allow to get only 28 days.

It is possible, that best solution is concatenate results of these commands. But I don't know rules that assign content of these logs. I asked about this on askubuntu.com

Sources:

question about old logs askubuntu.com
my extended question on askubuntu.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions