General :: Log Rotation Of Stdout?
Jun 1, 2011
I have a Linux program which can write information to stdout and stderr.
I have a shell script which redirects that output to a file in /var/log. (Via >> and 2>&1.)
Is there a way to make that log file rotate? (max size, then switch to a different file, keep only a limited number of files)
I've seen a few answers which talk about the logrotate program, which sounds good, but they also seem to be focused on programs which are generating log files internally and handle HUP signals. Is there a way to make this work with a basic output redirection script?
View 3 Replies
ADVERTISEMENT
Sep 26, 2010
I have a process which logs output to log.txt. If I want to see the process's status in real-time, is there a way to echo that output to stdout instead of opening the log in a text editor and constantly reloading?
View 3 Replies
View Related
Aug 16, 2011
I want to keep a trace of the URL I visit, so I use a command line like this:
tcpdump -ien1 -v -X 'tcp port 80' | sed -nl
's/^.0x[0-9a-f]{4}:.{43}(.)$/1/p' |perl break.pl |perl -pe
's/(GET|POST).(.*?).HTTP/1....Host:.([a-zA-Z._0-9-]*)../"
BEGURL
[Code]....
I also tried redirecting stdout and stderr to /tmp/out, it's still empty. The file has write access. I have no idea what it can be. Is there anything else than stdout and stderr?
View 2 Replies
View Related
Mar 26, 2011
I tried this command to print the buffer of an existing screen session to stdout but I don't know why it doesn't print anything.
screen -x lftp -X hardcopy /dev/fd/1
screen -x lftp -X hardcopy /dev/stdout
It works if I use a regular file instead, so why doesn't it print to stdout when I use /dev/fd/1? I do this with other applications don't have an option to write to stdout and it works, so what does GNU/Screen do that makes it not work?
View 1 Replies
View Related
Aug 5, 2011
Am having issues getting the output from a script to be logged in a file. I need the script to output both the stderr and stdout to the same text file.
At present I have the following script:
Code:
#!/bin/bash
echo TR3_1 > printers.txt
snmpget -v 1 -c public 10.168.**.* SNMPv2-SMI::mib-2.43.10.2.1.4.1.1 &>> printers.txt
[Code].....
View 4 Replies
View Related
Feb 22, 2011
I have a starServer.sh command in a shell script along with a bunch of command. Th startServer.sh command prints out stuff on stdout and stays printing since the server is up. However eve though I want to start the server I want it to continue executing the commands after ./startServer.sh in the same flow.
View 4 Replies
View Related
Jun 3, 2011
I have several commands in a bash script, and in the middle of the script there are several commands whose output and error streams I want to redirect to a file. I think I could simply add '>> myfile.txt' to the end of every command, but is there a way to set it before that block of commands, then reset the streams to their original state at the end of that block?
View 1 Replies
View Related
Aug 18, 2009
-bash-3.2# tar -xzvf lzo-2.03.tar.gz
gzip: stdout: Cannot allocate memory
lzo-2.03/
lzo-2.03/src/
[code]....
This is on a VPS with 256mb memory. vmstat and /prov/meminfo both show that over 200mb is free.
View 1 Replies
View Related
Nov 20, 2009
i'm trying to redirect the output of a command to the input of the next command. not sure if i'm going about this the right way. an easy method would be just to store the output of the previous command in a file and redirect input to read that file, but i'm curious to see if this can be done without writing to any files.
View 9 Replies
View Related
May 14, 2011
I am running a dual monitor setup, and prefer to have my secondary monitor rotated 90 degrees. I am able to do this in Gnome using preferences, and am wondering how to accomplish the same in XFCE.
View 6 Replies
View Related
May 7, 2010
I choose a rotating background for the desktop (astronomical pictures). How can I stop this rotation and decide to keep a specific picture instead of letting the system rotate the background every few seconds?
View 6 Replies
View Related
Jan 25, 2011
I have configured /etc/syslog.conf for writing user level log messages, and it is working fine.
The line which i entered is: user.* /home/shekhar/obj/myjob.log
But the log file keeps increasing. I would like to rotate the log file when it reaches 100Kb.
How do i do that in red hat linux ?
View 1 Replies
View Related
Jul 13, 2009
I have fedora 10 and I rotated my display upside down using Display settings (I don't know if it is the same thing as system-config-display, I had an icon called Display settings on my panel). It didn't work, my screen became black and now I can't change it back. Can I somehow change it back using terminal only? There's no rotation set in my xorg.conf file, I tried to set different rotation in xorg.conf, but it had no effect.
View 2 Replies
View Related
Mar 2, 2010
I have a big LCD screen.I make it 90 degrees retated to play games .But I want to know :if I can get rotation in boot up? I'm using Fedora 12 in KDE. My screen display driver is Intel . I think can write something into /etc/X11/xorg.conf to make it,or write into KDE's init script /usr/bin/startkde ( if there is a command like"rotate 90",then I can write it here).
View 3 Replies
View Related
May 25, 2011
I have up graded to natty 11.04 and am trying to get magick rotation 1.4 working on my hp tx2000 model 2130ea.I have spent a lot of time reading the forums and trying stuff including breaking natty a few times and had ton do a reinstall. Anyway I am not to sure what I am doing wrong missing a script or something I have tried a few different ways to try and rotate screen at the moment I have magick rotation installed and the only thing I can do with it is turn on/off touch and if I move the courser over the green arrow icon a drop down box appears saying its loading. I did turn on the bug report and this is what it says I attached the log.
View 7 Replies
View Related
Jan 17, 2010
Fedora 12 64-bit
Asus mobo M4A78-E
Samsung 2494HM display
The captioned display support 90 deg rotation. Which software do I need to install?
Tried editing /etc/X11/xorg.conf as;
View 2 Replies
View Related
Aug 19, 2010
I can't seem to get my ldap.log file to rotate on Ubuntu 9.10. I've added to the logrotate.conf file the following..
/var/log/ldap.log {
missingok
monthly
create 0660 root utmp
rotate 1 }
I have also tried putting the path to the file /etc/logrotate.d/rsyslog. Restarted services and still no logrotation for the ldap.log..
View 5 Replies
View Related
Jun 30, 2009
I want to parse my mail log file and reuse the results but I'm having a hard time structuring the syntax. Something like:
Code:
grep hostname /var/log/mail.log |
grep NOQUEUE: |
sed -e 's/hostname postfix/smtpd/[[0-9]*]: //g'
at this point I want to redirect what I have in hand to a file but also ... fork? or split? whatever the term, to continue onward so that I can pipe the results further into wc -l or sort or programX. without having to re-loop through that huge log file.
View 2 Replies
View Related
Nov 25, 2015
DE: lxde
version: Jessie
using xorg file: no
After changing my video cards from gigabyte HD5450 and saphire X550 to two saphire r7 240s one of my debian installs no longer supports rotating the monitors either with 'Monitor Settings' or xrandr. The only difference between these 2 Jessie installs is that one was upgraded and the other one was fresh. The problem is with the upgraded one. On the fresh installed debian I just put the ati proprietary driver so I won't do further testing on it but xrandr was working fine on it before that.
I tried going over the ATIHowTo [URL] .... and everything looks good. Tried purging the non free firmware and reinstalling. I verified the version numbers of libxrandr2 and kernel of both installs. It is either some scrap left over from wheezy or a configuration file I am not aware of.
So what actually happens is xrandr does not say anything, blanks out all windows on the screen with only their background color and title bar showing, changes the lxpanel to its background pattern except for 2 blanked out boxes almost to the right of the screen( I have 10 tray icons there before it blanks), activates the screen I wanted to rotate with the proper rotation. On my main screen I can't click on anything. On the rotated screen I can right click and I get my openbox right click menu like I do on my main monitor before the command but when I try to run something nothing happens. The only way I can get out of this situation is to go to ctrl-alt-f1, log in as root and type 'service lightdm restart'.
Both of these monitors are connected to the primary video card, an ati r7 240 saphire. The main one is on vga and the other one is on DVI. I also have another monitor connected to HDMI but it's not being used. I have yet another monitor connected to the VGA of the secondary GPU I don't think it's a problem is it? I tried not using 'xrandr --setprovideroutputsource 1 0' and it still did the same thing.
I tried just launching openbox with no LXDE and it did the same thing.
Also another strange thing is when I stop the lightdm service and try to 'startx' or 'xinit' my screens go blank; numlock, control-alt-delete and control-alt-f1 do nothing and the only thing I can do is an emergency REISUB. I didn't configure this install to use startx or xinit yet but should it really lock up my system?
On the affected system my script looks like this (I already did this step by step and the 'rotate left' line is causing the problem):
Code: Select allxrandr --setprovideroutputsource 1 0
xrandr --output VGA-0 --primary --mode 1680x1050 --pos 0x0 --rotate normal
--output DVI-0 --mode 1680x1050 --pos 0x1050 --rotate left
--output HDMI-0 --off
--output VGA-1-1 --off
lxpanelctl restart
Additional info:
Code: Select all$ inxi -G
Graphics: Card-1: Advanced Micro Devices [AMD/ATI] Oland PRO [Radeon R7 240]
Card-2: Advanced Micro Devices [AMD/ATI] Oland PRO [Radeon R7 240]
Display Server: X.Org 1.16.4 drivers: ati,radeon (unloaded: fbdev,vesa)
Resolution: 1680x1050@59.88hz, 1680x1050@59.95hz
GLX Renderer: Gallium 0.4 on AMD OLAND GLX Version: 3.0 Mesa 10.3.2
[Code] .....
View 14 Replies
View Related
Mar 31, 2010
I just replaced my older monitor with a slightly newer, much nicer Dell 1905FP. I need to have it rotated, but I have no clue how to rotate it. I have seen several xorg.conf modifications that are supposed to work for some of the nvidia drivers, but nothing for the generic radeon driver. The radio buttons in SaX2 are grayed out as well. How do I set up X11 to rotate my display? Preferably without installing the other ATi driver, as I have tried before to switch to that one, and have been unsucessfull.
View 5 Replies
View Related
May 19, 2010
I have recently done a clean install of Lucid Lynx and set everything up the way I had it in Jaunty (skipped Karmic). However, I am now having problems with the Compiz Cube and Firefox 3.6.
Whenever I rotate my workspace that contains a Firefox window that is active, the animation is very jerky and slow. It is fine if Firefox is a background window. This was never a problem in Jaunty with Firefox 3.0.
Is anyone else having this problem? Does anyone know how I might be able to fix it? I have tried disabling all addons in Firefox.
My PC: Core 2 Duo E7400, Geforce 7010 (onboard), 2GB RAM
UPDATE: starting Firefox in Safe Mode seems to help a little. Not sure why though...
View 9 Replies
View Related
Oct 21, 2010
I have a slight problem with setting of a stylus in my Tecra m7. It works fine when screen is in default position, but when I rotate the screen to vertical (left/CCW) touchpad and stylus input does not change so when I move it up it it goes right ^^'
xinput goes like this:
Code:
I already tried few .sh's from this forum archives but it didn't seem to work. I disabled driver for graphic card, because recommended version showed only violet screen when starting system and older version does not support rotation. I use Ubuntu 10.10 with Gnome.
View 9 Replies
View Related
Dec 24, 2010
I am running Kubuntu 10.10 x64, using a Wacom Bamboo (CTH-460), I installed it by compiling the driver and moving the file as in every tutorial I could find in the Internet. The pen works perfectly, except by the fact I use TwinView and the tablet uses all the width, too sensitive. but this is something I plan to fix later... (pressure is OK)
the problem is the touch.. It almost works, right click, zoom and scroll support is ok, I believe there is no support to rotation but I can live without it... The problem is the cursor movement, seems to be a sensitivity issue. If I move very slow there is no problem, but if i move a little faster the cursor stops as if I had removed the finger from the sensor. When I try to scroll or zoom I have a similar problem, it moves an inch before it start to scroll as if it wasn't sensing the second finger, but right click is perfect so I don't think this is the problem.
Would this be a bug? Is there a way to calibrate the touch sensor? I remember editing the xorg.conf to make the touch fit the screen size in a HP Tx2510us, and to make two finger scroll on to touch pad but it was in 8.10 I believe, I cant find something like it for this problem. wacomcpl cant see the device, xsetwacom list returns nothing... xinput list returns this:
[Code]....
View 9 Replies
View Related
Apr 22, 2011
How can I get the cube rotation on a laptop with a touchpad? I love it on my desktop at work, really gets a great "WOW!" when people see it in action.I have the CSSM and extras installed, but can't figure out the keybindings with the touchpad.....
View 4 Replies
View Related
Jun 10, 2011
I have a big problem my hard drive is works fast all the time and now i hear clicks and scratching and weird stuff from so how can i make it slow down. i cant buy a new one if it breaks down ...
View 6 Replies
View Related
Jan 22, 2010
In this example, why does blacklist end up in the file blacklist and $a end up in stdout?
[code]...
The desired result is to have a file containing the results of lsmod which had the first word on the line beginning with snd_ copied into another file preceded by the word blacklist.
View 4 Replies
View Related
May 5, 2010
I have an HP Pavilion tx2000 tablet, wich is working perfectly in Ubuntu 10.04. The touch and the stylus works out of box, and i'm using the script that Favux has posted to rotate my screen and i've installed the wacomrotate daemon, wich is working too. Now, I've two questions: How to calibrate it? The stylus is ok, but the touch isn't calibrated. In Karmic, I was using wacomcpl and xsetwacom, but neither of them detect my tablet now (in 9.10, Hal was used to detect the tablet, now it's xserver-xorg-input-wacom).
[code]...
It's possible to set up the automatic screen rotation, like in Windows (the screen rotates automaticaly in tablet position)?
View 9 Replies
View Related
Jul 1, 2010
Recently installed ubuntu on my gateway m275 tablet alongside windows xp tablet. Everything, including the stylus/pen without any poking around. However, I'm having trouble getting the screen orientation to rotate.
If I go to system-preferences-monitors, the only option for rotation is "normal".
Here is my xorg.conf:
Code:
View 9 Replies
View Related
Sep 14, 2010
i have fail2ban on server but everytime fail2ban conducts a log rotation it unbans all the banned IP's. I have ip's to be banned for a week whenever a log rotation happens or i restart fail2ban i dont want all the ip's released! I was thinking there was a script or patch that would fix this but i have come up short.
View 2 Replies
View Related
May 27, 2011
I just installed ubuntu 10.04.02 on to my tablet, aside from the dreaded intel video problem. Install went ok, but I'm finding now. That when I rotate the screen, the touch screen isn't adjusting to match. I'm not really ubuntu savvy.
View 6 Replies
View Related