8 messages in ru.sysoev.nginxRe: how can I fetch byte logs in ngin...
FromSent OnAttachments
Joe ShangNov 14, 2008 9:58 am 
mikeNov 14, 2008 10:16 am 
Joe ShangNov 14, 2008 10:22 am 
mikeNov 14, 2008 10:32 am 
Igor SysoevNov 14, 2008 10:33 am 
Gena MakhomedNov 14, 2008 10:38 am 
Joe ShangNov 14, 2008 12:59 pm 
mikeNov 14, 2008 1:20 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: how can I fetch byte logs in nginx like "%{%s}t %I .\n%{%s}t %O ."Actions...
From:mike (mike@gmail.com)
Date:Nov 14, 2008 10:32:11 am
List:ru.sysoev.nginx

Timestamp and bytes?

log_format byteslog '$time_local $bytes_sent';

access_log /var/log/nginx/DOMAIN.COM-bytes_log byteslog;

$time_local is this syntax "14/Nov/2008:10:27:48 -0800"

I am not sure there is a timestamp variable. You could look at $msec, the time with an accuracy to microseconds at the moment of the log entry

This has some of the variables: http://wiki.codemongers.com/NginxHttpLogModule

You can also use any of these: $query_string $request_method $content_type $content_length $fastcgi_script_name $request_uri $document_uri $document_root $server_protocol $remote_addr $remote_port $server_addr $server_port $http_host $server_name

Not sure what other ones are out there too.

On Fri, Nov 14, 2008 at 10:22 AM, Joe Shang <joe.@gmail.com> wrote:

basically the outcome of the byte-log files would be:

1226686775 238 . 1226686776 527 . 1226686776 5270 . 1226686776 448 . 1226686776 5455 . 1226686777 391 . 1226686777 5274 . 1226686777 549 . 1226686777 196 . 1226686777 456 . 1226686777 197 . 1226686777 154 . 1226686777 5455 . 1226686896 66 . 1226686896 251 . 1226686896 284 . 1226686896 1949 .

On Fri, Nov 14, 2008 at 12:16 PM, mike <mike@gmail.com> wrote:

to save us lazy people some time can you define what each of these is?

On Fri, Nov 14, 2008 at 9:58 AM, Joe Shang <joe.@gmail.com> wrote:

In Apache I fetch byte logs using:

CustomLog /usr/local/apache/logs/DOMAIN.COM-bytes_log "%{%s}t %I .\n%{%s}t %O ."

Can I achieve the similar effect this does in Apache, in nginx ?

If so, can anyone give me the proper syntax to do so in nginx config?