Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Remote logging with a laptop?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
LIsLinuxIsSogood
Apprentice
Apprentice


Joined: 13 Feb 2016
Posts: 262

PostPosted: Thu Sep 07, 2017 11:41 pm    Post subject: Remote logging with a laptop? Reply with quote

Hi. I am generally unfamiliar with the remote logging features offered in linux, but would like to implement for my machine which is a laptop. Is this ill advised? Due to the fact that laptop is usually not always connected onto the same network, I was wondering if there might be in existence a solution for syncing logs to the remote computer then removing them so that few would need to live on my small SSD that my lapotp is equipped with.

The terabytes of storage on my desktop at home is what I'm after, but don't have a constant connection of course, nor do I prefer to create a remote solution that requires port forwarding or internet resources. Strictly need to set something up like a rsync for those? However to let the system logger and logrotate facilities "know" about it.


Are these reasonable criteria for the some variety of solutions? and if so, suggestions are welcome.

Further thoughts
If there is a solution I would prefer to keep control of all the parts of this on the side of the laptop as client side management seems important with the source of the logs being my laptop and the storage on server machine at home, which I will not need except for when I want to have access to it.

Basically I plan to not have to open up the ports for acessing the logs on my desktop server, but would keep the minimal amount of logs on my laptop and just like syncing to portage and repo's would like to daily set up a cron job for moving the logs over and perhaps setting some priority messaging with those logs. Taking one step at a time, what program for logging would be suggested and do they all (all three of the system logging applications for linux) support remote logging, and is that even what I want? Or do I want to log locally?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6154
Location: almost Mile High in the USA

PostPosted: Fri Sep 08, 2017 3:35 am    Post subject: Reply with quote

I prefer logging locally if I'm actually using that machine. I'd only consider logging remotely if I'm not the primary user of that machine. Also due to the non-constant network availability, your best bet is to log locally anyway and rsyncing when network is available.

So if your desktop doesn't have a constant connection with static or pseudo-static IP (i.e. dynamic dns), you might have other problems anyway.

I'd look into just keeping what you need to keep on the laptop and log all of that, and don't log anything else, if that's what you need. One of my laptops has a 32GB SSD and I still keep desktop-like syslog on it. Not a big issue for it at all.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
LIsLinuxIsSogood
Apprentice
Apprentice


Joined: 13 Feb 2016
Posts: 262

PostPosted: Fri Sep 08, 2017 5:36 am    Post subject: Reply with quote

eccerr0r, my desktop does not have any of the static connections set up, which is why I would be resorting to some port forwarding...it works basically for other purposes (remote login or serving ftp, http whatever) however I agree this does not appear to be a good case for using the network. Instead, I will do your suggestion and just keep it all on the laptop. If anything, I could just be needing to make use of logrotate for the time being, and eventually just clearing more of these logs - or saving them somewhere like you described. Do you use logrotate on the laptop for any reason? What is the benefit of having it?

P.S. I just saw your name on another post that is so funny I know you are on here a bunch, thanks for the help with getting these things handled.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 6154
Location: almost Mile High in the USA

PostPosted: Fri Sep 08, 2017 7:08 am    Post subject: Reply with quote

Actually yes I do use logrotate on the 32G laptop, I had forgotten about it. However the amount of log spam is fairly low, or at least it's a good idea to keep it low (a LOT of good reasons from disk space waste, reducing unnecessary disk io bandwidth, to unnecessary endurance writes). I had thought that the endurance was one of the key issues, but it turns out not so much as long as you're not spamming your logfiles.

Keeping them trimmed with logrotate is not an excuse to stop looking at the logfiles!

Anyway yes it'd also be good looking into syslog-ng.conf editing to reduce log writes to perhaps also save power for HDD laptops (not so much for SSD). I find the default logging about right for general use. Sometimes I wonder if it's worth logging all those random ssh attempts trying to break into my machines, I really can't do much about them anyway.

For systemd users, journalctl can also chop your binary logfiles to reduce log storage (IIRC it's --vacuum something, check manpage).

I actually have a off brand SSD in this machine with the 32G SSD. I've been trying to log SMART data to see if I can figure out some of the SMART fields by periodically writing SMART data to the SSD. So much for endurance.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum