The tag has no wiki summary.

learn more… | top users | synonyms

-1
votes
1answer
22 views

how to set linux hostname based on flashdisk volume label [closed]

i'am running live linux, which run from FAT32 flashdisk since i run a lot of pc using this flashdisk, its difficult to identify which IP for its hostname, since its ip need to be dynamically ...
1
vote
3answers
65 views

Parseable NGINX accesslog files with delimiters

The default NGINX format is this: log_format combined '$remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" ...
0
votes
1answer
18 views

Parse requests per OS type apache log

I'm trying to return a sorted list of requests per OS type, parsed from an Apache access_log file (not combined format as I need the user-agent info). Here's an example of the output I'm looking for: ...
1
vote
3answers
588 views

In PowerShell, how can I parse a preformatted output?

Is there existing tooling to take text-based output and pipe it to a dynamic object that can be queried as columns? Specifically, I'm invoking .. query session /server:MYSERVER .. which is ...
0
votes
3answers
47 views

Listing usernames that are actually computers in Debian

I have inherited about 6 servers (all Debian based), and part of my project over the next year is consolidate everything into one server. There are 6 "domains" running from Samba3 installations, and ...
0
votes
0answers
49 views

Packet ingress Parsing/Classification - basics

I'm trying to learn - the details of 'life of a packet' through a Switch. I'm unable to figure out / find a document which answers the following questions : When a packet is received on a port (ex: ...
0
votes
1answer
135 views

Parse Apache logfile and ban IPs

My server is under attack, it is flooded with request with the following pattern: Thousands of IPs Each IP request the same page "GET / HTTP/1.1" with the same referrer 3-5 times per second (same ...
1
vote
2answers
375 views

Scripts or tools to parse email message to remove attachment of particular name

I have configured Redmine email integration and while it's awesome, a major annoyance is that people have signatures that include a company logo, which then gets posted to every ticket they update via ...
2
votes
1answer
71 views

How to handle many daily emails from cron efficiently?

With each new server comes at least one more daily crontab email. The FreeBSD servers even send two: a daily and a security run output. Thanks to my obsession with virtualisation the number of emails ...
-3
votes
2answers
536 views

How can I limit the output of the whois command?

How do I get only the owner/orgname from a PTR whois lookup? I don't need all the other entires, just the part about ownership (google in this case). Edit /usr/bin/whois 74.125.236.52 or any ip ...
0
votes
1answer
230 views

Shell script to parse ip:port from a text file

I get daily a text file with ip:port, one per line, example: 11.22.33.44:80 22.33.44.55:8080 33.44.55.66:7777 I would like to parse the first ip and port in two different variables, then write them ...
5
votes
3answers
72 views

Discover intended Foreign Keys from JOINS in scripts

I'm inheriting a database that has 400 tables and only 150 foreign key constraints registered. Knowing what I do about the application and looking at the table columns, it's easy to say that there ...
2
votes
2answers
2k views

Having difficulty getting multi-line Powershell regex to work - no matches

I referred to several examples I was able to search, which seemed highly pertinent, but am still unable to get this to work. My input looks like this, from a dhcp server stats command, and I've ...
16
votes
3answers
20k views

How do I grep through binary files that look like text?

I have binary files that should be text (they're exported logs), but I can't open it with less (it looks ugly - it looks like a binary file). I found that I could open it with vi and I can cat it ...
0
votes
1answer
376 views

Bash getops: allow, but not require arg

I'm writing a bash script, parsing options with getopts like this: #!/bin/bash while getopts ab: ; do case $opt in a) AOPT=1 ;; b) BOPT=$OPTARG ...
1
vote
1answer
73 views

Obtain Bacula status in parseable format

Is it possible to obtain the status of Bacula Director in some parseable format? It looks like the human-readable representation (one you can see when using bacula-console) is formed on the director ...
2
votes
5answers
282 views

Check availability of my websites

How can I check the availability of websites from hosted by company? Ping the server and checking if the services for IIS or Apache/Tomcat is not enough. I want to see if the sites are responsive, if ...
3
votes
2answers
720 views

Ways to parse NCSA combined based log files

I've done a bit of site: searching with Google on Server Fault, Super User and Stack Overflow. I also checked non site specific results and and didn't really see a question like this, so here goes... ...
1
vote
1answer
580 views

Potential issues with tab delimited Logformat for apache 2.2x?

My employer has a CustomLog piped handler that reduces and preps the static web content machine access logs into a format that is kosher for being dumped into hadoop/hive. Unfortunately it hinges on ...
1
vote
2answers
1k views

Parse/Edit Apache conf files with Ruby?

I need to write some scripts to make changes to Apache conf files, namely to add/update VirtualHosts. I plan on doing this in Ruby. before I write my own, are there any scripts/rubygems which allow ...
4
votes
1answer
945 views

Parsing iometer results

How do your visualise your iometer results?
2
votes
6answers
3k views

Get list of user-agents from nginx log

I have nginx log file, and I want to find out market share for each major version of browsers. I am not interested in minor versions and operating systems. I would like to get something like this: ...
0
votes
2answers
401 views

Possible interface types that may show up in “ip addr show”?

Consider the output of a typical ip addr show on Linux: # ip addr show 1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet ...
37
votes
12answers
38k views

Do you have any useful awk and grep scripts for parsing apache logs?

I can use log analyzers, but often I need to parse recent web logs to see what's happening at the moment. I sometimes do things like to figure out top 10 ips that request a certain file cat foo.log ...