troubleshooting Question

wtmp growing with too many entries from same tty session

Avatar of artur_dietrich
artur_dietrich asked on
Unix OSPythonScripting Languages
4 Comments1 Solution704 ViewsLast Modified:

I have a problem with serial tty connected to etherlite devices. These ttys, any moment, generate many wtmp entries, making wtmp grows fast. I have not discovered the etherlite problem, and now I am thinking of filtering wtmp with fwtmp. I need to remove this "almost duplicated" lines, since there is just one,two or three seconds between each register of the same tty, same session. So I need a routine (shell, Perl, Python, awk, etc) to help to remove these supposed erroneuos (etherlite generated) lines in a routine which will run batch 23:50 by cron. Need to keep the start login line information and the final login line information for each session, removing these "quickly repeated" intermediated lines. Attached, a example print screen and full wtmp file generated by the command /usr/sbin/acct/fwtmp </var/adm/wtmp.

Best Regards.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros