Opened 5 years ago

Closed 5 years ago

#13980 closed enhancement (implemented)

Added new script for warnings in chutney's logs

Reported by: huig Owned by: nickm
Priority: Medium Milestone:
Component: Core Tor/Chutney Version:
Severity: Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In chutney's repository in the TODO file there was a comment about doing a script for getting warnings in the logs. The script is at https://github.com/huig-/chutney and i made a pull request days ago (see https://trac.torproject.org/projects/tor/ticket/13956#ticket) with a different change but now it also includes the script about warnings. The script basically gets warnings int net/nodes/*/info.logs and counts how many times each warning occurs. I have also added an option to get the warnings of only one node (specified by the user) instead of all of them.

The script is called warnings.sh

Child Tickets

Attachments (1)

notice.log (272.7 KB) - added by dgoulet 5 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 5 years ago by dgoulet

I just tried it and I think you need to remove the timestamp when you are counting events because I get a *lots* of duplicate but I figure they are unique because of the time.

Warning: The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more. Number: 4
Warning: Your log may contain sensitive information - you disabled SafeLogging, and you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards. Number: 1
Warning: The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more. Number: 4
Warning: Your log may contain sensitive information - you disabled SafeLogging, and you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards. Number: 1
Warning: The DirAuthority options 'hs' and 'no-hs' are obsolete; you don't need them any more. Number: 4
Warning: Your log may contain sensitive information - you disabled SafeLogging, and you're logging more than "notice". Don't log unless it serves an important reason. Overwrite the log afterwards. Number: 1

Great tools btw! Thanks for this!

Changed 5 years ago by dgoulet

Attachment: notice.log added

comment:2 Changed 5 years ago by huig

Thanks for the bug! I think now it should run correctly, apparently uniq fails sometimes if the file isn't sorted.

comment:3 Changed 5 years ago by dgoulet

Status: newneeds_review

Great, working perfectly for me!

comment:4 Changed 5 years ago by nickm

Resolution: implemented
Status: needs_reviewclosed

lgtm now. Merged to master.

(In the future, you should probably keep your patches in separate branches, and make your master a pristine copy of the upstream master. This keeps your master and mine from becoming desynchronized.)

Note: See TracTickets for help on using tickets.