Sponsored Content
Full Discussion: Extract data from log
Top Forums Shell Programming and Scripting Extract data from log Post 302937142 by clx on Wednesday 4th of March 2015 12:48:48 AM
Old 03-04-2015
Welcome to the forums. Have you tried something?
This User Gave Thanks to clx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help: Log data extract

So I got this old webapp doing some strange format with its logging and I need to extract only specific parts. Basically the format of the log goes: Date:<space>timestamp User:<space>userid AppID:<space>applicationid Duration:<space>time(ms) <line> <line> Date:<space>timestamp... (1 Reply)
Discussion started by: kenm0j0
1 Replies

2. Shell Programming and Scripting

How to extract last week data from a log

HI, I have a log file (sync.log) in the following format. 05-14 05:34:56 INFO Hxxx Start: Id:xxx 05-14 05:45:32 INFO Hxxx End: Id:xxxx 05-19 11:23:21 INFO Hxxx Start: Id:xxx 05-19 11:34:45 INFO Hxxx End: Id:xxxx 05-20 02:09:47 INFO Hxxx Start: Id:xxx 05-20 02:36:03 INFO Hxxx End: Id:xxx... (5 Replies)
Discussion started by: praveenvi
5 Replies

3. Shell Programming and Scripting

shell-script which extract data from log file

give me a shell-script which extract data from log file on a server by giving date and time as input (for both start time and end time) and it will give the logs generated during the given time as output. (4 Replies)
Discussion started by: abhishek27
4 Replies

4. Shell Programming and Scripting

Extract data from log file from or after the specific date

Hi , I am having a script which will start a process and appends the process related logs to a log file. The log file writes logs with every line starting with date in the format of: date +"%Y %b %d %H:%M:%S". So, in the script, before I start the process, I am storing the date as DATE=`date +"%Y... (5 Replies)
Discussion started by: chiru_h
5 Replies

5. Shell Programming and Scripting

need a shell script to extract data from a log file.

If I have a log like : Mon Jul 19 05:07:34 2010; TCP; eth3; 52 bytes; from abc to def Mon Jul 19 05:07:35 2010; UDP; eth3; 46 bytes; from aaa to bbb Mon Jul 19 05:07:35 2010; TCP; eth3; 52 bytes; from def to ghi I will need an output like this : Time abc to def... (1 Reply)
Discussion started by: hitha87
1 Replies

6. Shell Programming and Scripting

How to extract log data based on date

Hi Gurus, I've been having some problem in extracting the log data based on the current date and month. As shown in the sample data below, how to extract the log info for Aug 11? Sample data: root pts/ta userpc Wed Aug 11 09:46 - 20:21 (10:35) root pts/ta userpc... (13 Replies)
Discussion started by: superHonda123
13 Replies

7. Shell Programming and Scripting

Data Extract from XML Log File

Please help me out to extract the Data from the XML Log files. So here is the data ERROR|2010-08-26 00:05:52,958|SERIAL_ID=128279996|ST=2010-08-2600:05:52|DEVICE=113.2.21.12:601|TYPE=TransactionLog... (9 Replies)
Discussion started by: raghunsi
9 Replies

8. Shell Programming and Scripting

Extract data from log file in specified range of time

I was searching for parsing a log file and found what I need in this link http://stackoverflow.com/questions/7575267/extract-data-from-log-file-in-specified-range-of-time But the most useful answer (posted by @Kent): # this variable you could customize, important is convert to seconds. # e.g... (2 Replies)
Discussion started by: kingk110
2 Replies

9. UNIX for Dummies Questions & Answers

Extract date ranged data from log file

Hi, I am trying to extract lines of data within a log file on a Redhat 5 Linux system. eg I need all the lines with a particular username over the last 3 minutes. the log file may read like this, and I want a way to search all the lines extracting all the relevant lines over the last 3... (2 Replies)
Discussion started by: mantis100
2 Replies

10. Shell Programming and Scripting

Extract data from log file within specified time

So, we have a script, that is supposed to have a couple of functions like showing number of failed connections, recieved bytes per IP-address, and so on. We are supposed to be able to limit the number of results to either 0-24 hours or X days back from the last data in the log file. Everything... (3 Replies)
Discussion started by: Plumpen
3 Replies
FSARCHIVER(8)						      System Manager's Manual						     FSARCHIVER(8)

NAME
fsarchiver - filesystem archiver DESCRIPTION
fsarchiver is a system tool that allows you to save the contents of a filesystem to a compressed archive file. The file-system can be restored on a partition which has a different size and it can be restored on a different file-system. Unlike tar/dar, FSArchiver also cre- ates the filesystem when it extracts the data to partitions. Everything is checksummed in the archive in order to protect the data. If the archive is corrupt, you just lose the current file, not the whole archive. LINKS
Official project homepage: http://www.fsarchiver.org Quick Start Guide: http://www.fsarchiver.org/QuickStart Forums where to ask questions: http://www.fsarchiver.org/forums/ Report a bug: http://www.fsarchiver.org/forums/viewforum.php?f=17 SYNOPSIS
fsarchiver [ options ] savefs archive filesystem ... fsarchiver [ options ] restfs archive id=n,dest=filesystem[,mkfs=fstype] ... fsarchiver [ options ] savedir archive directory ... fsarchiver [ options ] restdir archive destination fsarchiver [ options ] archinfo archive fsarchiver [ options ] probe [detailed] COMMANDS
savefs Save filesystems to archive. restfs Restore filesystems from archive. This overwrites the existing data on filesystems. Zero-based index n indicates the part of the archive to restore. Optionally, a filesystem may be converted to fstype. savedir Save directories to archive (similar to a compressed tarball). restdir Restore data from archive which is not based on a filesystem to destination. archinfo Show information about an existing archive file and its contents. probe Show list of filesystems detected on the disks. OPTIONS
-h, --help Show help and information about how to use fsarchiver with examples. -V, --version Show program version and exit. -v, --verbose Verbose mode (can be used several times to increase the level of details). The details will be printed to the console. -o, --overwrite Overwrite the archive if it already exists instead of failing. -d, --debug Debug mode (can be used several times to increase the level of details). The details will be written in /var/log/fsarchiver.log. -A, --allow-rw-mounted Allow to save a filesystem which is mounted in read-write (live backup). By default fsarchiver fails with an error if the partition if mounted in read-write mode which allows modifications to be done on the filesystem during the backup. Modifications can drive to inconsistencies in the backup. Using lvm snapshots is the recommended way to make backups since it will provide consistency, but it is only available for filesystems which are on LVM logical-volumes. -a, --allow-no-acl-xattr Allow to run savefs when partition is mounted without the acl/xattr options. By default fsarchiver fails with an error if the par- tition is mounted in such a way that the ACL and Extended-Attributes are not readable. These attributes would not be saved and then such attributes could be lost. If you know what you don't need ACL and Extended-Attributes to be preserved then it's safe to run fsarchiver with that option. -e pattern, --exclude=pattern Exclude files and directories that match that pattern. The pattern can contains shell asterisks such as * and ?, and the pattern may be either a simple file/dir name or an absolute file/dir path. You must use quotes around the pattern each time you use wildcards, else it would be interpreted by the shell. The wildcards must be interpreted by fsarchiver. See examples below for more details about this option. -L label, --label=label Set the label of the archive: it's just a comment about the contents. It can be used to remember a particular thing about the ar- chive or the state of the filesystem for instance. -z level, --compress=level Valid compression levels are between 1 (very fast) and 9 (very good). The memory requirement increases a lot with the best compres- sion levels, and it's multiplied by the number of compression threads (option -j). Level 9 is considered as an extreme compression level and requires an huge amount of memory to run. For more details please read this page: http://www.fsarchiver.org/Compression -s mbsize, --split=mbsize Split the archive into several files of mbsize megabytes each. -j count, --jobs=count Create more than one compression thread. Useful on multi-core CPUs. By default fsarchiver will only use one compression thread (-j 1) and then only one logical processor will be used for compression. You should use that option if you have a multi-core CPU or more than one physical CPU on your computer. The typical way to use this option is to specify the number of logical processors available so that all the processing power is used to compress the archive very quickly. You may also want to use all the logical processors but one for that task so that the system stays responsive for other applications. -c password, --cryptpass=password Encrypt/decrypt data in archive. Password length: 6 to 64 chars. You can either provide a real password or a dash ("-c -") with this option if you do not want to provide the password in the command line and you want to be prompted for a password in the termi- nal instead. EXAMPLES
save only one filesystem (/dev/sda1) to an archive: fsarchiver savefs /data/myarchive1.fsa /dev/sda1 save two filesystems (/dev/sda1 and /dev/sdb1) to an archive: fsarchiver savefs /data/myarchive2.fsa /dev/sda1 /dev/sdb1 restore the first filesystem from an archive (first = number 0): fsarchiver restfs /data/myarchive2.fsa id=0,dest=/dev/sda1 restore the second filesystem from an archive (second = number 1): fsarchiver restfs /data/myarchive2.fsa id=1,dest=/dev/sdb1 restore two filesystems from an archive (number 0 and 1): fsarchiver restfs /data/arch2.fsa id=0,dest=/dev/sda1 id=1,dest=/dev/sdb1 restore a filesystem from an archive and convert it to reiserfs: fsarchiver restfs /data/myarchive1.fsa id=0,dest=/dev/sda1,mkfs=reiserfs save the contents of /usr/src/linux to an archive (similar to tar): fsarchiver savedir /data/linux-sources.fsa /usr/src/linux save a /dev/sda1 to an archive split into volumes of 680MB: fsarchiver savefs -s 680 /data/myarchive1.fsa /dev/sda1 save a filesystem and exclude all files/dirs called 'pagefile.*' fsarchiver savefs /data/myarchive.fsa /dev/sda1 --exclude='pagefile.*' exclude 'share' in both '/usr/share' and '/usr/local/share': fsarchiver savefs /data/myarchive.fsa --exclude=share absolute exclude valid for '/usr/share' but not '/usr/local/share' fsarchiver savefs /data/myarchive.fsa --exclude=/usr/share save a filesystem (/dev/sda1) to an encrypted archive: fsarchiver savefs -c mypassword /data/myarchive1.fsa /dev/sda1 extract an archive made of simple files to /tmp/extract: fsarchiver restdir /data/linux-sources.fsa /tmp/extract show information about an archive and its file systems: fsarchiver archinfo /data/myarchive2.fsa WARNING
fsarchiver is still in development, don't use it for critical data yet. AUTHOR
fsarchiver was written by Francois Dupoux. It is released under the GPL2 (GNU General Public License version 2). This manpage was written by Ilya Barygin and Francois Dupoux. 30 December 2009 FSARCHIVER(8)
All times are GMT -4. The time now is 10:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy