Em Andamento

Linux Systems Administration SysAdmin Bash shell logging script exec bash history logs logger

I need a couple of Linux systems admin tweaks....

First what's the best way to add timestamp to Linux prompt and to what file .profile bashprofile /etc globally etc bla bla.

Second I'm sick and tired of bash_history missing many commands or having some deleted due to crashed/frozen putty sessions.

What's best way to ensure I NEVER lose any bash_history, that I record ALL without any limit to file size, or if can't make me .bash_history_datestamp_archive or something like? [url removed, login to view]

The other thing is I want LOGGING of my linux shell if I am NOT using putty, but similar to how putty has option to LOG the entire session.

I hear there's is the "SCRIPT" command for this but problem is it only works for me if i start a linux shell and then myself type script command, but I wasn't able to automate it. Where can I add this so that a LOGGING file named with file date/timestamp starts AUTOMATICALLY every time i start a session? I heard other solution is using "exec" command ie [url removed, login to view]

like exec > >(tee -a [url removed, login to view])

Anyway this logging shouldn't corrupt the file if i use vi for editing in my session etc, but it doesn't have to properly log the vi text, i know even putty messes up logging the vi editing. But everything else it should log well, commands, output from commands, out put form more or cat etc...

And it should save each of the shell 'sessions' to a date/timestamped file. Again I don't want to myself run the command to start logging, i want it in /etc/profile or /home/user/.bashrc or user/.profile etc so that logging starts whenever a SHELL is run/opened ...

Besides "Script" command or "Exec" you should also look into TTY SNOOPing or starting a "SCREEN" session and then logging it with it somehow (screen supports screen -x snooping and logging to i think?) , tty watcher , sniff etc. Main thing I don't want to use complex 3rd party code that can't be trusted so solutions based on existing tools inside linux distributions is preferred. (There's ttyrec and others also)

Here's some more links i dug up quickly I don't have time to test and find out the best methods to achieve what i want, i'm looking for someone who's already been there done that:

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

[url removed, login to view]

If you don't figure out WHICH is best just give me Several solutions that are AUTOMATED like i want, ie i start a shell session i don't have to remember to start logging or to exit things etc...should do it for me and i should have resulting datestamped logfiles.

Habilidades: Linux, PHP, Shell Script, Arquitetura de software, Administrador do Sistema

Ver mais: bash exec logger, exec bash putty, bash shell logger, run shell script from php, net it systems, how to find solutions, how to find a file in linux, audit php code, audit file, 30 second script, what is shell scripting, time logger, shell bash, m linux, linux m, in linux shell script, bash file, bash 0, www audit com, linux find, text tee, systems, sniff, sick and tired, linux bash script

Acerca do Empregador:
( 58 comentários ) 92614, United States

ID do Projeto: #5130730

Premiar a:

dUcBtu

Hello! Yes, all that you have listed can be used. What and how to use depends only on the goals. For example, If you want to record only the commands and their output, the most easy way - script. .bashrc: if [ -z " Mais

$30 USD em 1 dia
(2 Avaliações)
1.3

3 freelancers estão ofertando em média $109 para este trabalho

aash666

A proposal has not yet been provided

$111 USD in 3 dias
(30 Comentários)
4.3
Mulder1

Hi! I have a large experience in Linux sysadmin. I am new here on freelancer, so I want to gain reputation and get a good opinion from you.

$111 USD in 3 dias
(0 Comentários)
0.0
mailsmaity

I can do this part by part.. Few things to be modified on your systemm.. Ready to work on this.. will deliver project with in time. please assign to me. looking forward to work with you my skype id - ma Mais

$105 USD in 3 dias
(1 Comentário)
0.6