Commit b4f4e20e authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make vsctool.py produce the VSC .rst doc.

Retire vsc2rst
parent 2643ce32
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
.. varnish_vsc_begin:: lck .. varnish_vsc_begin:: lck
:oneliner: Lock Counters :oneliner: Lock Counters
Counters which track the activity in the different classes
of mutex-locks.
.. varnish_vsc:: creat .. varnish_vsc:: creat
:type: counter :type: counter
:level: debug :level: debug
......
...@@ -10,78 +10,79 @@ ...@@ -10,78 +10,79 @@
:sumfunction: :sumfunction:
.. varnish_vsc:: summs .. varnish_vsc:: summs
:level: debug
:oneliner: stat summ operations :oneliner: stat summ operations
.. varnish_vsc:: uptime .. varnish_vsc:: uptime
:oneliner: Child process uptime :oneliner: Child process uptime
How long the child process has been running. How long the child process has been running.
.. varnish_vsc:: sess_conn .. varnish_vsc:: sess_conn
:oneliner: Sessions accepted :oneliner: Sessions accepted
Count of sessions successfully accepted Count of sessions successfully accepted
.. varnish_vsc:: sess_drop .. varnish_vsc:: sess_drop
:oneliner: Sessions dropped :oneliner: Sessions dropped
Count of sessions silently dropped due to lack of worker thread. Count of sessions silently dropped due to lack of worker thread.
.. varnish_vsc:: sess_fail .. varnish_vsc:: sess_fail
:oneliner: Session accept failures :oneliner: Session accept failures
Count of failures to accept TCP connection. Either the client Count of failures to accept TCP connection. Either the client
changed its mind, or the kernel ran out of some resource like file changed its mind, or the kernel ran out of some resource like file
descriptors. descriptors.
.. varnish_vsc:: client_req_400 .. varnish_vsc:: client_req_400
:oneliner: Client requests received, subject to 400 errors :oneliner: Client requests received, subject to 400 errors
400 means we couldn't make sense of the request, it was malformed 400 means we couldn't make sense of the request, it was malformed
in some drastic way. in some drastic way.
.. varnish_vsc:: client_req_417 .. varnish_vsc:: client_req_417
:oneliner: Client requests received, subject to 417 errors :oneliner: Client requests received, subject to 417 errors
417 means that something went wrong with an Expect: header. 417 means that something went wrong with an Expect: header.
.. varnish_vsc:: client_req .. varnish_vsc:: client_req
:oneliner: Good client requests received :oneliner: Good client requests received
The count of parseable client requests seen. The count of parseable client requests seen.
.. varnish_vsc:: cache_hit .. varnish_vsc:: cache_hit
:oneliner: Cache hits :oneliner: Cache hits
Count of cache hits. A cache hit indicates that an object has been Count of cache hits. A cache hit indicates that an object has been
delivered to a client without fetching it from a backend server. delivered to a client without fetching it from a backend server.
.. varnish_vsc:: cache_hitpass .. varnish_vsc:: cache_hitpass
:oneliner: Cache hits for pass. :oneliner: Cache hits for pass.
Count of hits for pass. A cache hit for pass indicates that Varnish Count of hits for pass. A cache hit for pass indicates that Varnish
is going to pass the request to the backend and this decision has is going to pass the request to the backend and this decision has
been cached in it self. This counts how many times the cached been cached in it self. This counts how many times the cached
decision is being used. decision is being used.
.. varnish_vsc:: cache_hitmiss .. varnish_vsc:: cache_hitmiss
:oneliner: Cache hits for miss. :oneliner: Cache hits for miss.
Count of hits for miss. A cache hit for miss indicates that Varnish Count of hits for miss. A cache hit for miss indicates that Varnish
is going to proceed as for a cache miss without request coalescing, is going to proceed as for a cache miss without request coalescing,
and this decision has been cached. This counts how many times the and this decision has been cached. This counts how many times the
cached decision is being used. cached decision is being used.
.. varnish_vsc:: cache_miss .. varnish_vsc:: cache_miss
:oneliner: Cache misses :oneliner: Cache misses
Count of misses. A cache miss indicates the object was fetched from Count of misses. A cache miss indicates the object was fetched from
the backend before delivering it to the client. the backend before delivering it to the client.
.. varnish_vsc:: backend_conn .. varnish_vsc:: backend_conn
:oneliner: Backend conn. success :oneliner: Backend conn. success
How many backend connections have successfully been established. How many backend connections have successfully been established.
.. varnish_vsc:: backend_unhealthy .. varnish_vsc:: backend_unhealthy
:oneliner: Backend conn. not attempted :oneliner: Backend conn. not attempted
...@@ -98,16 +99,16 @@ How many backend connections have successfully been established. ...@@ -98,16 +99,16 @@ How many backend connections have successfully been established.
.. varnish_vsc:: backend_reuse .. varnish_vsc:: backend_reuse
:oneliner: Backend conn. reuses :oneliner: Backend conn. reuses
Count of backend connection reuses. This counter is increased Count of backend connection reuses. This counter is increased
whenever we reuse a recycled connection. whenever we reuse a recycled connection.
.. varnish_vsc:: backend_recycle .. varnish_vsc:: backend_recycle
:oneliner: Backend conn. recycles :oneliner: Backend conn. recycles
Count of backend connection recycles. This counter is increased Count of backend connection recycles. This counter is increased
whenever we have a keep-alive connection that is put back into the whenever we have a keep-alive connection that is put back into the
pool of connections. It has not yet been used, but it might be, pool of connections. It has not yet been used, but it might be,
unless the backend closes it. unless the backend closes it.
.. varnish_vsc:: backend_retry .. varnish_vsc:: backend_retry
:oneliner: Backend conn. retry :oneliner: Backend conn. retry
...@@ -116,183 +117,183 @@ unless the backend closes it. ...@@ -116,183 +117,183 @@ unless the backend closes it.
.. varnish_vsc:: fetch_head .. varnish_vsc:: fetch_head
:oneliner: Fetch no body (HEAD) :oneliner: Fetch no body (HEAD)
beresp with no body because the request is HEAD. beresp with no body because the request is HEAD.
.. varnish_vsc:: fetch_length .. varnish_vsc:: fetch_length
:oneliner: Fetch with Length :oneliner: Fetch with Length
beresp.body with Content-Length. beresp.body with Content-Length.
.. varnish_vsc:: fetch_chunked .. varnish_vsc:: fetch_chunked
:oneliner: Fetch chunked :oneliner: Fetch chunked
beresp.body with Chunked. beresp.body with Chunked.
.. varnish_vsc:: fetch_eof .. varnish_vsc:: fetch_eof
:oneliner: Fetch EOF :oneliner: Fetch EOF
beresp.body with EOF. beresp.body with EOF.
.. varnish_vsc:: fetch_bad .. varnish_vsc:: fetch_bad
:oneliner: Fetch bad T-E :oneliner: Fetch bad T-E
beresp.body length/fetch could not be determined. beresp.body length/fetch could not be determined.
.. varnish_vsc:: fetch_none .. varnish_vsc:: fetch_none
:oneliner: Fetch no body :oneliner: Fetch no body
beresp.body empty beresp.body empty
.. varnish_vsc:: fetch_1xx .. varnish_vsc:: fetch_1xx
:oneliner: Fetch no body (1xx) :oneliner: Fetch no body (1xx)
beresp with no body because of 1XX response. beresp with no body because of 1XX response.
.. varnish_vsc:: fetch_204 .. varnish_vsc:: fetch_204
:oneliner: Fetch no body (204) :oneliner: Fetch no body (204)
beresp with no body because of 204 response. beresp with no body because of 204 response.
.. varnish_vsc:: fetch_304 .. varnish_vsc:: fetch_304
:oneliner: Fetch no body (304) :oneliner: Fetch no body (304)
beresp with no body because of 304 response. beresp with no body because of 304 response.
.. varnish_vsc:: fetch_failed .. varnish_vsc:: fetch_failed
:oneliner: Fetch failed (all causes) :oneliner: Fetch failed (all causes)
beresp fetch failed. beresp fetch failed.
.. varnish_vsc:: fetch_no_thread .. varnish_vsc:: fetch_no_thread
:oneliner: Fetch failed (no thread) :oneliner: Fetch failed (no thread)
beresp fetch failed, no thread available. beresp fetch failed, no thread available.
.. varnish_vsc:: pools .. varnish_vsc:: pools
:type: gauge :type: gauge
:oneliner: Number of thread pools :oneliner: Number of thread pools
Number of thread pools. See also parameter thread_pools. NB: Presently Number of thread pools. See also parameter thread_pools. NB: Presently
pools cannot be removed once created. pools cannot be removed once created.
.. varnish_vsc:: threads .. varnish_vsc:: threads
:type: gauge :type: gauge
:oneliner: Total number of threads :oneliner: Total number of threads
Number of threads in all pools. See also parameters thread_pools, Number of threads in all pools. See also parameters thread_pools,
thread_pool_min and thread_pool_max. thread_pool_min and thread_pool_max.
.. varnish_vsc:: threads_limited .. varnish_vsc:: threads_limited
:oneliner: Threads hit max :oneliner: Threads hit max
Number of times more threads were needed, but limit was reached in Number of times more threads were needed, but limit was reached in
a thread pool. See also parameter thread_pool_max. a thread pool. See also parameter thread_pool_max.
.. varnish_vsc:: threads_created .. varnish_vsc:: threads_created
:oneliner: Threads created :oneliner: Threads created
Total number of threads created in all pools. Total number of threads created in all pools.
.. varnish_vsc:: threads_destroyed .. varnish_vsc:: threads_destroyed
:oneliner: Threads destroyed :oneliner: Threads destroyed
Total number of threads destroyed in all pools. Total number of threads destroyed in all pools.
.. varnish_vsc:: threads_failed .. varnish_vsc:: threads_failed
:oneliner: Thread creation failed :oneliner: Thread creation failed
Number of times creating a thread failed. See VSL::Debug for Number of times creating a thread failed. See VSL::Debug for
diagnostics. See also parameter thread_fail_delay. diagnostics. See also parameter thread_fail_delay.
.. varnish_vsc:: thread_queue_len .. varnish_vsc:: thread_queue_len
:type: gauge :type: gauge
:oneliner: Length of session queue :oneliner: Length of session queue
Length of session queue waiting for threads. NB: Only updates once Length of session queue waiting for threads. NB: Only updates once
per second. See also parameter thread_queue_limit. per second. See also parameter thread_queue_limit.
.. varnish_vsc:: busy_sleep .. varnish_vsc:: busy_sleep
:oneliner: Number of requests sent to sleep on busy objhdr :oneliner: Number of requests sent to sleep on busy objhdr
Number of requests sent to sleep without a worker thread because Number of requests sent to sleep without a worker thread because
they found a busy object. they found a busy object.
.. varnish_vsc:: busy_wakeup .. varnish_vsc:: busy_wakeup
:oneliner: Number of requests woken after sleep on busy objhdr :oneliner: Number of requests woken after sleep on busy objhdr
Number of requests taken off the busy object sleep list and rescheduled. Number of requests taken off the busy object sleep list and rescheduled.
.. varnish_vsc:: busy_killed .. varnish_vsc:: busy_killed
:oneliner: Number of requests killed after sleep on busy objhdr :oneliner: Number of requests killed after sleep on busy objhdr
Number of requests killed from the busy object sleep list due to Number of requests killed from the busy object sleep list due to
lack of resources. lack of resources.
.. varnish_vsc:: sess_queued .. varnish_vsc:: sess_queued
:oneliner: Sessions queued for thread :oneliner: Sessions queued for thread
Number of times session was queued waiting for a thread. See also Number of times session was queued waiting for a thread. See also
parameter thread_queue_limit. parameter thread_queue_limit.
.. varnish_vsc:: sess_dropped .. varnish_vsc:: sess_dropped
:oneliner: Sessions dropped for thread :oneliner: Sessions dropped for thread
Number of times session was dropped because the queue were too long Number of times session was dropped because the queue were too long
already. See also parameter thread_queue_limit. already. See also parameter thread_queue_limit.
.. varnish_vsc:: n_object .. varnish_vsc:: n_object
:type: gauge :type: gauge
:oneliner: object structs made :oneliner: object structs made
Approximate number of HTTP objects (headers + body, if present) in Approximate number of HTTP objects (headers + body, if present) in
the cache. the cache.
.. varnish_vsc:: n_vampireobject .. varnish_vsc:: n_vampireobject
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: unresurrected objects :oneliner: unresurrected objects
Number of unresurrected objects Number of unresurrected objects
.. varnish_vsc:: n_objectcore .. varnish_vsc:: n_objectcore
:type: gauge :type: gauge
:oneliner: objectcore structs made :oneliner: objectcore structs made
Approximate number of object metadata elements in the cache. Each Approximate number of object metadata elements in the cache. Each
object needs an objectcore, extra objectcores are for hit-for-miss, object needs an objectcore, extra objectcores are for hit-for-miss,
hit-for-pass and busy objects. hit-for-pass and busy objects.
.. varnish_vsc:: n_objecthead .. varnish_vsc:: n_objecthead
:type: gauge :type: gauge
:oneliner: objecthead structs made :oneliner: objecthead structs made
Approximate number of different hash entries in the cache. Approximate number of different hash entries in the cache.
.. varnish_vsc:: n_backend .. varnish_vsc:: n_backend
:type: gauge :type: gauge
:oneliner: Number of backends :oneliner: Number of backends
Number of backends known to us. Number of backends known to us.
.. varnish_vsc:: n_expired .. varnish_vsc:: n_expired
:type: gauge :type: gauge
:oneliner: Number of expired objects :oneliner: Number of expired objects
Number of objects that expired from cache because of old age. Number of objects that expired from cache because of old age.
.. varnish_vsc:: n_lru_nuked .. varnish_vsc:: n_lru_nuked
:type: gauge :type: gauge
:oneliner: Number of LRU nuked objects :oneliner: Number of LRU nuked objects
How many objects have been forcefully evicted from storage to make How many objects have been forcefully evicted from storage to make
room for a new object. room for a new object.
.. varnish_vsc:: n_lru_moved .. varnish_vsc:: n_lru_moved
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Number of LRU moved objects :oneliner: Number of LRU moved objects
Number of move operations done on the LRU list. Number of move operations done on the LRU list.
.. varnish_vsc:: losthdr .. varnish_vsc:: losthdr
:oneliner: HTTP header overflows :oneliner: HTTP header overflows
...@@ -325,37 +326,37 @@ Number of move operations done on the LRU list. ...@@ -325,37 +326,37 @@ Number of move operations done on the LRU list.
.. varnish_vsc:: s_req_hdrbytes .. varnish_vsc:: s_req_hdrbytes
:oneliner: Request header bytes :oneliner: Request header bytes
Total request header bytes received Total request header bytes received
.. varnish_vsc:: s_req_bodybytes .. varnish_vsc:: s_req_bodybytes
:oneliner: Request body bytes :oneliner: Request body bytes
Total request body bytes received Total request body bytes received
.. varnish_vsc:: s_resp_hdrbytes .. varnish_vsc:: s_resp_hdrbytes
:oneliner: Response header bytes :oneliner: Response header bytes
Total response header bytes transmitted Total response header bytes transmitted
.. varnish_vsc:: s_resp_bodybytes .. varnish_vsc:: s_resp_bodybytes
:oneliner: Response body bytes :oneliner: Response body bytes
Total response body bytes transmitted Total response body bytes transmitted
.. varnish_vsc:: s_pipe_hdrbytes .. varnish_vsc:: s_pipe_hdrbytes
:oneliner: Pipe request header bytes :oneliner: Pipe request header bytes
Total request bytes received for piped sessions Total request bytes received for piped sessions
.. varnish_vsc:: s_pipe_in .. varnish_vsc:: s_pipe_in
:oneliner: Piped bytes from client :oneliner: Piped bytes from client
Total number of bytes forwarded from clients in pipe sessions Total number of bytes forwarded from clients in pipe sessions
.. varnish_vsc:: s_pipe_out .. varnish_vsc:: s_pipe_out
:oneliner: Piped bytes to client :oneliner: Piped bytes to client
Total number of bytes forwarded to clients in pipe sessions Total number of bytes forwarded to clients in pipe sessions
.. varnish_vsc:: sess_closed .. varnish_vsc:: sess_closed
:oneliner: Session Closed :oneliner: Session Closed
...@@ -364,8 +365,8 @@ Total number of bytes forwarded to clients in pipe sessions ...@@ -364,8 +365,8 @@ Total number of bytes forwarded to clients in pipe sessions
.. varnish_vsc:: sess_closed_err .. varnish_vsc:: sess_closed_err
:oneliner: Session Closed with error :oneliner: Session Closed with error
Total number of sessions closed with errors. See sc_* diag counters Total number of sessions closed with errors. See sc_* diag counters
for detailed breakdown for detailed breakdown
.. varnish_vsc:: sess_readahead .. varnish_vsc:: sess_readahead
:oneliner: Session Read Ahead :oneliner: Session Read Ahead
...@@ -375,109 +376,109 @@ for detailed breakdown ...@@ -375,109 +376,109 @@ for detailed breakdown
:level: diag :level: diag
:oneliner: Session herd :oneliner: Session herd
Number of times the timeout_linger triggered Number of times the timeout_linger triggered
.. varnish_vsc:: sc_rem_close .. varnish_vsc:: sc_rem_close
:level: diag :level: diag
:oneliner: Session OK REM_CLOSE :oneliner: Session OK REM_CLOSE
Number of session closes with REM_CLOSE (Client Closed) Number of session closes with REM_CLOSE (Client Closed)
.. varnish_vsc:: sc_req_close .. varnish_vsc:: sc_req_close
:level: diag :level: diag
:oneliner: Session OK REQ_CLOSE :oneliner: Session OK REQ_CLOSE
Number of session closes with REQ_CLOSE (Client requested close) Number of session closes with REQ_CLOSE (Client requested close)
.. varnish_vsc:: sc_req_http10 .. varnish_vsc:: sc_req_http10
:level: diag :level: diag
:oneliner: Session Err REQ_HTTP10 :oneliner: Session Err REQ_HTTP10
Number of session closes with Error REQ_HTTP10 (Proto < HTTP/1.1) Number of session closes with Error REQ_HTTP10 (Proto < HTTP/1.1)
.. varnish_vsc:: sc_rx_bad .. varnish_vsc:: sc_rx_bad
:level: diag :level: diag
:oneliner: Session Err RX_BAD :oneliner: Session Err RX_BAD
Number of session closes with Error RX_BAD (Received bad req/resp) Number of session closes with Error RX_BAD (Received bad req/resp)
.. varnish_vsc:: sc_rx_body .. varnish_vsc:: sc_rx_body
:level: diag :level: diag
:oneliner: Session Err RX_BODY :oneliner: Session Err RX_BODY
Number of session closes with Error RX_BODY (Failure receiving req.body) Number of session closes with Error RX_BODY (Failure receiving req.body)
.. varnish_vsc:: sc_rx_junk .. varnish_vsc:: sc_rx_junk
:level: diag :level: diag
:oneliner: Session Err RX_JUNK :oneliner: Session Err RX_JUNK
Number of session closes with Error RX_JUNK (Received junk data) Number of session closes with Error RX_JUNK (Received junk data)
.. varnish_vsc:: sc_rx_overflow .. varnish_vsc:: sc_rx_overflow
:level: diag :level: diag
:oneliner: Session Err RX_OVERFLOW :oneliner: Session Err RX_OVERFLOW
Number of session closes with Error RX_OVERFLOW (Received buffer overflow) Number of session closes with Error RX_OVERFLOW (Received buffer overflow)
.. varnish_vsc:: sc_rx_timeout .. varnish_vsc:: sc_rx_timeout
:level: diag :level: diag
:oneliner: Session Err RX_TIMEOUT :oneliner: Session Err RX_TIMEOUT
Number of session closes with Error RX_TIMEOUT (Receive timeout) Number of session closes with Error RX_TIMEOUT (Receive timeout)
.. varnish_vsc:: sc_tx_pipe .. varnish_vsc:: sc_tx_pipe
:level: diag :level: diag
:oneliner: Session OK TX_PIPE :oneliner: Session OK TX_PIPE
Number of session closes with TX_PIPE (Piped transaction) Number of session closes with TX_PIPE (Piped transaction)
.. varnish_vsc:: sc_tx_error .. varnish_vsc:: sc_tx_error
:level: diag :level: diag
:oneliner: Session Err TX_ERROR :oneliner: Session Err TX_ERROR
Number of session closes with Error TX_ERROR (Error transaction) Number of session closes with Error TX_ERROR (Error transaction)
.. varnish_vsc:: sc_tx_eof .. varnish_vsc:: sc_tx_eof
:level: diag :level: diag
:oneliner: Session OK TX_EOF :oneliner: Session OK TX_EOF
Number of session closes with TX_EOF (EOF transmission) Number of session closes with TX_EOF (EOF transmission)
.. varnish_vsc:: sc_resp_close .. varnish_vsc:: sc_resp_close
:level: diag :level: diag
:oneliner: Session OK RESP_CLOSE :oneliner: Session OK RESP_CLOSE
Number of session closes with RESP_CLOSE (Backend/VCL requested close) Number of session closes with RESP_CLOSE (Backend/VCL requested close)
.. varnish_vsc:: sc_overload .. varnish_vsc:: sc_overload
:level: diag :level: diag
:oneliner: Session Err OVERLOAD :oneliner: Session Err OVERLOAD
Number of session closes with Error OVERLOAD (Out of some resource) Number of session closes with Error OVERLOAD (Out of some resource)
.. varnish_vsc:: sc_pipe_overflow .. varnish_vsc:: sc_pipe_overflow
:level: diag :level: diag
:oneliner: Session Err PIPE_OVERFLOW :oneliner: Session Err PIPE_OVERFLOW
Number of session closes with Error PIPE_OVERFLOW (Session pipe overflow) Number of session closes with Error PIPE_OVERFLOW (Session pipe overflow)
.. varnish_vsc:: sc_range_short .. varnish_vsc:: sc_range_short
:level: diag :level: diag
:oneliner: Session Err RANGE_SHORT :oneliner: Session Err RANGE_SHORT
Number of session closes with Error RANGE_SHORT (Insufficient data for range) Number of session closes with Error RANGE_SHORT (Insufficient data for range)
.. varnish_vsc:: sc_req_http20 .. varnish_vsc:: sc_req_http20
:level: diag :level: diag
:oneliner: Session Err REQ_HTTP20 :oneliner: Session Err REQ_HTTP20
Number of session closes with Error REQ_HTTP20 (HTTP2 not accepted) Number of session closes with Error REQ_HTTP20 (HTTP2 not accepted)
.. varnish_vsc:: sc_vcl_failure .. varnish_vsc:: sc_vcl_failure
:level: diag :level: diag
:oneliner: Session Err VCL_FAILURE :oneliner: Session Err VCL_FAILURE
Number of session closes with Error VCL_FAILURE (VCL failure) Number of session closes with Error VCL_FAILURE (VCL failure)
.. varnish_vsc:: shm_records .. varnish_vsc:: shm_records
:level: diag :level: diag
...@@ -525,126 +526,126 @@ Number of session closes with Error VCL_FAILURE (VCL failure) ...@@ -525,126 +526,126 @@ Number of session closes with Error VCL_FAILURE (VCL failure)
.. varnish_vsc:: vcl_fail .. varnish_vsc:: vcl_fail
:oneliner: VCL failures :oneliner: VCL failures
Count of failures which prevented VCL from completing. Count of failures which prevented VCL from completing.
.. varnish_vsc:: bans .. varnish_vsc:: bans
:type: gauge :type: gauge
:oneliner: Count of bans :oneliner: Count of bans
Number of all bans in system, including bans superseded by newer Number of all bans in system, including bans superseded by newer
bans and bans already checked by the ban-lurker. bans and bans already checked by the ban-lurker.
.. varnish_vsc:: bans_completed .. varnish_vsc:: bans_completed
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Number of bans marked 'completed' :oneliner: Number of bans marked 'completed'
Number of bans which are no longer active, either because they got Number of bans which are no longer active, either because they got
checked by the ban-lurker or superseded by newer identical bans. checked by the ban-lurker or superseded by newer identical bans.
.. varnish_vsc:: bans_obj .. varnish_vsc:: bans_obj
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Number of bans using obj.* :oneliner: Number of bans using obj.*
Number of bans which use obj.* variables. These bans can possibly Number of bans which use obj.* variables. These bans can possibly
be washed by the ban-lurker. be washed by the ban-lurker.
.. varnish_vsc:: bans_req .. varnish_vsc:: bans_req
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Number of bans using req.* :oneliner: Number of bans using req.*
Number of bans which use req.* variables. These bans can not be Number of bans which use req.* variables. These bans can not be
washed by the ban-lurker. washed by the ban-lurker.
.. varnish_vsc:: bans_added .. varnish_vsc:: bans_added
:level: diag :level: diag
:oneliner: Bans added :oneliner: Bans added
Counter of bans added to ban list. Counter of bans added to ban list.
.. varnish_vsc:: bans_deleted .. varnish_vsc:: bans_deleted
:level: diag :level: diag
:oneliner: Bans deleted :oneliner: Bans deleted
Counter of bans deleted from ban list. Counter of bans deleted from ban list.
.. varnish_vsc:: bans_tested .. varnish_vsc:: bans_tested
:level: diag :level: diag
:oneliner: Bans tested against objects (lookup) :oneliner: Bans tested against objects (lookup)
Count of how many bans and objects have been tested against each Count of how many bans and objects have been tested against each
other during hash lookup. other during hash lookup.
.. varnish_vsc:: bans_obj_killed .. varnish_vsc:: bans_obj_killed
:level: diag :level: diag
:oneliner: Objects killed by bans (lookup) :oneliner: Objects killed by bans (lookup)
Number of objects killed by bans during object lookup. Number of objects killed by bans during object lookup.
.. varnish_vsc:: bans_lurker_tested .. varnish_vsc:: bans_lurker_tested
:level: diag :level: diag
:oneliner: Bans tested against objects (lurker) :oneliner: Bans tested against objects (lurker)
Count of how many bans and objects have been tested against each Count of how many bans and objects have been tested against each
other by the ban-lurker. other by the ban-lurker.
.. varnish_vsc:: bans_tests_tested .. varnish_vsc:: bans_tests_tested
:level: diag :level: diag
:oneliner: Ban tests tested against objects (lookup) :oneliner: Ban tests tested against objects (lookup)
Count of how many tests and objects have been tested against each Count of how many tests and objects have been tested against each
other during lookup. 'ban req.url == foo && req.http.host == bar' other during lookup. 'ban req.url == foo && req.http.host == bar'
counts as one in 'bans_tested' and as two in 'bans_tests_tested' counts as one in 'bans_tested' and as two in 'bans_tests_tested'
.. varnish_vsc:: bans_lurker_tests_tested .. varnish_vsc:: bans_lurker_tests_tested
:level: diag :level: diag
:oneliner: Ban tests tested against objects (lurker) :oneliner: Ban tests tested against objects (lurker)
Count of how many tests and objects have been tested against each Count of how many tests and objects have been tested against each
other by the ban-lurker. 'ban req.url == foo && req.http.host == other by the ban-lurker. 'ban req.url == foo && req.http.host ==
bar' counts as one in 'bans_tested' and as two in 'bans_tests_tested' bar' counts as one in 'bans_tested' and as two in 'bans_tests_tested'
.. varnish_vsc:: bans_lurker_obj_killed .. varnish_vsc:: bans_lurker_obj_killed
:level: diag :level: diag
:oneliner: Objects killed by bans (lurker) :oneliner: Objects killed by bans (lurker)
Number of objects killed by the ban-lurker. Number of objects killed by the ban-lurker.
.. varnish_vsc:: bans_lurker_obj_killed_cutoff .. varnish_vsc:: bans_lurker_obj_killed_cutoff
:level: diag :level: diag
:oneliner: Objects killed by bans for cutoff (lurker) :oneliner: Objects killed by bans for cutoff (lurker)
Number of objects killed by the ban-lurker to keep the number of Number of objects killed by the ban-lurker to keep the number of
bans below ban_cutoff. bans below ban_cutoff.
.. varnish_vsc:: bans_dups .. varnish_vsc:: bans_dups
:level: diag :level: diag
:oneliner: Bans superseded by other bans :oneliner: Bans superseded by other bans
Count of bans replaced by later identical bans. Count of bans replaced by later identical bans.
.. varnish_vsc:: bans_lurker_contention .. varnish_vsc:: bans_lurker_contention
:level: diag :level: diag
:oneliner: Lurker gave way for lookup :oneliner: Lurker gave way for lookup
Number of times the ban-lurker had to wait for lookups. Number of times the ban-lurker had to wait for lookups.
.. varnish_vsc:: bans_persisted_bytes .. varnish_vsc:: bans_persisted_bytes
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Bytes used by the persisted ban lists :oneliner: Bytes used by the persisted ban lists
Number of bytes used by the persisted ban lists. Number of bytes used by the persisted ban lists.
.. varnish_vsc:: bans_persisted_fragmentation .. varnish_vsc:: bans_persisted_fragmentation
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Extra bytes in persisted ban lists due to fragmentation :oneliner: Extra bytes in persisted ban lists due to fragmentation
Number of extra bytes accumulated through dropped and completed Number of extra bytes accumulated through dropped and completed
bans in the persistent ban lists. bans in the persistent ban lists.
.. varnish_vsc:: n_purges .. varnish_vsc:: n_purges
:type: gauge :type: gauge
...@@ -660,13 +661,13 @@ bans in the persistent ban lists. ...@@ -660,13 +661,13 @@ bans in the persistent ban lists.
:level: diag :level: diag
:oneliner: Number of objects mailed to expiry thread :oneliner: Number of objects mailed to expiry thread
Number of objects mailed to expiry thread for handling. Number of objects mailed to expiry thread for handling.
.. varnish_vsc:: exp_received .. varnish_vsc:: exp_received
:level: diag :level: diag
:oneliner: Number of objects received by expiry thread :oneliner: Number of objects received by expiry thread
Number of objects received by expiry thread for handling. Number of objects received by expiry thread for handling.
.. varnish_vsc:: hcb_nolock .. varnish_vsc:: hcb_nolock
:level: debug :level: debug
...@@ -709,52 +710,52 @@ Number of objects received by expiry thread for handling. ...@@ -709,52 +710,52 @@ Number of objects received by expiry thread for handling.
.. varnish_vsc:: n_test_gunzip .. varnish_vsc:: n_test_gunzip
:oneliner: Test gunzip operations :oneliner: Test gunzip operations
Those operations occur when Varnish receives a compressed object Those operations occur when Varnish receives a compressed object
from a backend. They are done to verify the gzip stream while it's from a backend. They are done to verify the gzip stream while it's
inserted in storage. inserted in storage.
.. varnish_vsc:: vsm_free .. varnish_vsc:: vsm_free
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Free VSM space :oneliner: Free VSM space
Number of bytes free in the shared memory used to communicate with Number of bytes free in the shared memory used to communicate with
tools like varnishstat, varnishlog etc. tools like varnishstat, varnishlog etc.
.. varnish_vsc:: vsm_used .. varnish_vsc:: vsm_used
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Used VSM space :oneliner: Used VSM space
Number of bytes used in the shared memory used to communicate with Number of bytes used in the shared memory used to communicate with
tools like varnishstat, varnishlog etc. tools like varnishstat, varnishlog etc.
.. varnish_vsc:: vsm_cooling .. varnish_vsc:: vsm_cooling
:type: gauge :type: gauge
:level: debug :level: debug
:oneliner: Cooling VSM space :oneliner: Cooling VSM space
Number of bytes which will soon (max 1 minute) be freed in the Number of bytes which will soon (max 1 minute) be freed in the
shared memory used to communicate with tools like varnishstat, shared memory used to communicate with tools like varnishstat,
varnishlog etc. varnishlog etc.
.. varnish_vsc:: vsm_overflow .. varnish_vsc:: vsm_overflow
:type: gauge :type: gauge
:level: diag :level: diag
:oneliner: Overflow VSM space :oneliner: Overflow VSM space
Number of bytes which does not fit in the shared memory used to Number of bytes which does not fit in the shared memory used to
communicate with tools like varnishstat, varnishlog etc. If this communicate with tools like varnishstat, varnishlog etc. If this
counter is not zero, consider increasing the runtime variable counter is not zero, consider increasing the runtime variable
vsm_space. vsm_space.
.. varnish_vsc:: vsm_overflowed .. varnish_vsc:: vsm_overflowed
:level: diag :level: diag
:oneliner: Overflowed VSM space :oneliner: Overflowed VSM space
Total number of bytes which did not fit in the shared memory used Total number of bytes which did not fit in the shared memory used
to communicate with tools like varnishstat, varnishlog etc. If this to communicate with tools like varnishstat, varnishlog etc. If this
counter is not zero, consider increasing the runtime variable counter is not zero, consider increasing the runtime variable
vsm_space. vsm_space.
.. varnish_vsc_end:: main .. varnish_vsc_end:: main
...@@ -37,13 +37,11 @@ ...@@ -37,13 +37,11 @@
:level: debug :level: debug
:oneliner: Allocations :oneliner: Allocations
.. varnish_vsc:: frees .. varnish_vsc:: frees
:type: counter :type: counter
:level: debug :level: debug
:oneliner: Frees :oneliner: Frees
.. varnish_vsc:: recycle .. varnish_vsc:: recycle
:type: counter :type: counter
:level: debug :level: debug
......
...@@ -13,48 +13,49 @@ ...@@ -13,48 +13,49 @@
:level: info :level: info
:oneliner: Management process uptime :oneliner: Management process uptime
Uptime in seconds of the management process Uptime in seconds of the management process
.. varnish_vsc:: child_start .. varnish_vsc:: child_start
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process started :oneliner: Child process started
Number of times the child process has been started Number of times the child process has been started
.. varnish_vsc:: child_exit .. varnish_vsc:: child_exit
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process normal exit :oneliner: Child process normal exit
Number of times the child process has been cleanly stopped Number of times the child process has been cleanly stopped
.. varnish_vsc:: child_stop .. varnish_vsc:: child_stop
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process unexpected exit :oneliner: Child process unexpected exit
Number of times the child process has exited with an unexpected return code Number of times the child process has exited with an
unexpected return code
.. varnish_vsc:: child_died .. varnish_vsc:: child_died
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process died (signal) :oneliner: Child process died (signal)
Number of times the child process has died due to signals Number of times the child process has died due to signals
.. varnish_vsc:: child_dump .. varnish_vsc:: child_dump
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process core dumped :oneliner: Child process core dumped
Number of times the child process has produced core dumps Number of times the child process has produced core dumps
.. varnish_vsc:: child_panic .. varnish_vsc:: child_panic
:type: counter :type: counter
:level: diag :level: diag
:oneliner: Child process panic :oneliner: Child process panic
Number of times the management process has caught a child panic Number of times the management process has caught a child panic
.. varnish_vsc_end:: mgt .. varnish_vsc_end:: mgt
...@@ -13,48 +13,48 @@ ...@@ -13,48 +13,48 @@
:level: info :level: info
:oneliner: Allocator requests :oneliner: Allocator requests
Number of times the storage has been asked to provide a storage segment. Number of times the storage has been asked to provide a storage segment.
.. varnish_vsc:: c_fail .. varnish_vsc:: c_fail
:type: counter :type: counter
:level: info :level: info
:oneliner: Allocator failures :oneliner: Allocator failures
Number of times the storage has failed to provide a storage segment. Number of times the storage has failed to provide a storage segment.
.. varnish_vsc:: c_bytes .. varnish_vsc:: c_bytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Bytes allocated :oneliner: Bytes allocated
Number of total bytes allocated by this storage. Number of total bytes allocated by this storage.
.. varnish_vsc:: c_freed .. varnish_vsc:: c_freed
:type: counter :type: counter
:level: info :level: info
:oneliner: Bytes freed :oneliner: Bytes freed
Number of total bytes returned to this storage. Number of total bytes returned to this storage.
.. varnish_vsc:: g_alloc .. varnish_vsc:: g_alloc
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Allocations outstanding :oneliner: Allocations outstanding
Number of storage allocations outstanding. Number of storage allocations outstanding.
.. varnish_vsc:: g_bytes .. varnish_vsc:: g_bytes
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Bytes outstanding :oneliner: Bytes outstanding
Number of bytes allocated from the storage. Number of bytes allocated from the storage.
.. varnish_vsc:: g_space .. varnish_vsc:: g_space
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Bytes available :oneliner: Bytes available
Number of bytes left in the storage. Number of bytes left in the storage.
.. varnish_vsc_end:: sma .. varnish_vsc_end:: sma
...@@ -13,49 +13,49 @@ ...@@ -13,49 +13,49 @@
:level: info :level: info
:oneliner: Allocator requests :oneliner: Allocator requests
Number of times the storage has been asked to provide a storage segment. Number of times the storage has been asked to provide a storage segment.
.. varnish_vsc:: c_fail .. varnish_vsc:: c_fail
:type: counter :type: counter
:level: info :level: info
:oneliner: Allocator failures :oneliner: Allocator failures
Number of times the storage has failed to provide a storage segment. Number of times the storage has failed to provide a storage segment.
.. varnish_vsc:: c_bytes .. varnish_vsc:: c_bytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Bytes allocated :oneliner: Bytes allocated
Number of total bytes allocated by this storage. Number of total bytes allocated by this storage.
.. varnish_vsc:: c_freed .. varnish_vsc:: c_freed
:type: counter :type: counter
:level: info :level: info
:oneliner: Bytes freed :oneliner: Bytes freed
Number of total bytes returned to this storage. Number of total bytes returned to this storage.
.. varnish_vsc:: g_alloc .. varnish_vsc:: g_alloc
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Allocations outstanding :oneliner: Allocations outstanding
Number of storage allocations outstanding. Number of storage allocations outstanding.
.. varnish_vsc:: g_bytes .. varnish_vsc:: g_bytes
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Bytes outstanding :oneliner: Bytes outstanding
Number of bytes allocated from the storage. Number of bytes allocated from the storage.
.. varnish_vsc:: g_space .. varnish_vsc:: g_space
:type: gauge :type: gauge
:level: info :level: info
:oneliner: Bytes available :oneliner: Bytes available
Number of bytes left in the storage. Number of bytes left in the storage.
.. varnish_vsc:: g_smf .. varnish_vsc:: g_smf
:type: gauge :type: gauge
......
...@@ -18,49 +18,49 @@ ...@@ -18,49 +18,49 @@
:level: info :level: info
:oneliner: Request header bytes :oneliner: Request header bytes
Total backend request header bytes sent Total backend request header bytes sent
.. varnish_vsc:: bereq_bodybytes .. varnish_vsc:: bereq_bodybytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Request body bytes :oneliner: Request body bytes
Total backend request body bytes sent Total backend request body bytes sent
.. varnish_vsc:: beresp_hdrbytes .. varnish_vsc:: beresp_hdrbytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Response header bytes :oneliner: Response header bytes
Total backend response header bytes received Total backend response header bytes received
.. varnish_vsc:: beresp_bodybytes .. varnish_vsc:: beresp_bodybytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Response body bytes :oneliner: Response body bytes
Total backend response body bytes received Total backend response body bytes received
.. varnish_vsc:: pipe_hdrbytes .. varnish_vsc:: pipe_hdrbytes
:type: counter :type: counter
:level: info :level: info
:oneliner: Pipe request header bytes :oneliner: Pipe request header bytes
Total request bytes sent for piped sessions Total request bytes sent for piped sessions
.. varnish_vsc:: pipe_out .. varnish_vsc:: pipe_out
:type: counter :type: counter
:level: info :level: info
:oneliner: Piped bytes to backend :oneliner: Piped bytes to backend
Total number of bytes forwarded to backend in pipe sessions Total number of bytes forwarded to backend in pipe sessions
.. varnish_vsc:: pipe_in .. varnish_vsc:: pipe_in
:type: counter :type: counter
:level: info :level: info
:oneliner: Piped bytes from backend :oneliner: Piped bytes from backend
Total number of bytes forwarded from backend in pipe sessions Total number of bytes forwarded from backend in pipe sessions
.. varnish_vsc:: conn .. varnish_vsc:: conn
:type: gauge :type: gauge
......
...@@ -20,6 +20,3 @@ varnishstat_LDADD = \ ...@@ -20,6 +20,3 @@ varnishstat_LDADD = \
$(top_builddir)/lib/libvarnishapi/libvarnishapi.la \ $(top_builddir)/lib/libvarnishapi/libvarnishapi.la \
@SAN_LDFLAGS@ \ @SAN_LDFLAGS@ \
@CURSES_LIB@ ${RT_LIBS} ${LIBM} ${PTHREAD_LIBS} @CURSES_LIB@ ${RT_LIBS} ${LIBM} ${PTHREAD_LIBS}
noinst_PROGRAMS = vsc2rst
vsc2rst_SOURCES = vsc2rst.c $(top_srcdir)/include/tbl/vsc_fields.h
/*-
* Copyright (c) 2011-2015 Varnish Software AS
* All rights reserved.
*
* Author: Tollef Fog Heen <tfheen@varnish-software.com>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
#ifndef __FLEXELINT__
#include "config.h"
#include <stdio.h>
#define VSC_LEVEL_F(v,l,e,d) \
static const char VSC_level_##v[] = #v;
#include "tbl/vsc_levels.h"
#undef VSC_LEVEL_F
static void
L(const char *s)
{
printf("\n%s\n", s);
for (;*s != '\0'; s++)
putchar('=');
putchar('\n');
putchar('\n');
}
int main(int argc, char **argv)
{
(void)argc;
(void)argv;
L("COUNTER LEVELS");
#define VSC_LEVEL_F(v,l,e,d) \
printf("%s – %s\n\t%s\n\n", l, e, d);
#include "tbl/vsc_levels.h"
#define VSC_DO(U,l,t,h) L(h);
#define VSC_F(n, t, l, s, f, v, d, e) \
do { \
printf("``%s`` – ", #n); \
if (s == 'c') \
printf("`counter` - "); \
else if (s == 'g') \
printf("`gauge` - "); \
else if (s == 'b') \
printf("`bitmap` - "); \
printf("%s\n\n", VSC_level_##v); \
printf("\t%s\n\n", d); \
printf("\t%s\n\n", e); \
} while (0);
#define VSC_DONE(U,l,t)
#include "tbl/vsc_all.h"
return (0);
}
#endif // __FLEXELINT__
...@@ -123,8 +123,21 @@ include/params.rst: $(top_builddir)/bin/varnishd/varnishd ...@@ -123,8 +123,21 @@ include/params.rst: $(top_builddir)/bin/varnishd/varnishd
$(top_builddir)/bin/varnishd/varnishd -x parameter > $@ $(top_builddir)/bin/varnishd/varnishd -x parameter > $@
BUILT_SOURCES += include/params.rst BUILT_SOURCES += include/params.rst
include/counters.rst: $(top_builddir)/bin/varnishstat/vsc2rst COUNTERS = \
$(top_builddir)/bin/varnishstat/vsc2rst > $@ $(top_srcdir)/bin/varnishd/main.vsc \
$(top_srcdir)/bin/varnishd/mgt.vsc \
$(top_srcdir)/bin/varnishd/mempool.vsc \
$(top_srcdir)/bin/varnishd/sma.vsc \
$(top_srcdir)/bin/varnishd/smf.vsc \
$(top_srcdir)/bin/varnishd/vbe.vsc \
$(top_srcdir)/bin/varnishd/lck.vsc
include/counters.rst: $(top_srcdir)/lib/libvcc/vsctool.py $(COUNTERS)
echo -n '' > $@
for i in $(COUNTERS); do \
$(PYTHON) $(top_srcdir)/lib/libvcc/vsctool.py -r $$i >> $@ ; \
done
BUILT_SOURCES += include/counters.rst BUILT_SOURCES += include/counters.rst
# XXX add varnishstat here when it's been _opt2rst'ed # XXX add varnishstat here when it's been _opt2rst'ed
......
#!/usr/bin/env python #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# #
# Copyright (c) 2017 Varnish Software AS # Copyright (c) 2017 Varnish Software AS
# All rights reserved. # All rights reserved.
...@@ -241,6 +242,16 @@ class rst_vsc_begin(directive): ...@@ -241,6 +242,16 @@ class rst_vsc_begin(directive):
def vscset(self, ss): def vscset(self, ss):
ss.append(vscset(self.arg, self)) ss.append(vscset(self.arg, self))
def emit_rst(self, fo):
fo.write("\n..\n\t" + self.cmd + ":: " + self.arg + "\n")
s = self.arg.upper() + " – " + self.param["oneliner"]
fo.write("\n")
fo.write(s + "\n")
fo.write("=" * len(s) + "\n")
self.emit_rst_doc(fo)
class rst_vsc(directive): class rst_vsc(directive):
def __init__(self, s): def __init__(self, s):
super(rst_vsc, self).__init__(s) super(rst_vsc, self).__init__(s)
...@@ -250,9 +261,11 @@ class rst_vsc(directive): ...@@ -250,9 +261,11 @@ class rst_vsc(directive):
self.param["level"] = "info" self.param["level"] = "info"
def emit_rst(self, fo): def emit_rst(self, fo):
fo.write("\n``%s`` - " % self.arg) fo.write("\n``%s`` " % self.arg)
fo.write("`%s` - " % self.param["type"]) fo.write("`%s` - " % self.param["type"])
fo.write("%s\n" % self.param["level"]) fo.write("%s\n\n" % self.param["level"])
fo.write("\t" + self.param["oneliner"] + "\n")
self.emit_rst_doc(fo) self.emit_rst_doc(fo)
def vscset(self, ss): def vscset(self, ss):
...@@ -266,6 +279,10 @@ class rst_vsc_end(directive): ...@@ -266,6 +279,10 @@ class rst_vsc_end(directive):
def vscset(self, ss): def vscset(self, ss):
ss[-1].complete() ss[-1].complete()
def emit_rst(self, fo):
fo.write("\n..\n\t" + self.cmd + ":: " + self.arg + "\n")
self.emit_rst_doc(fo)
class other(object): class other(object):
def __init__(self, s): def __init__(self, s):
self.s = s self.s = s
...@@ -316,8 +333,8 @@ class vsc_file(object): ...@@ -316,8 +333,8 @@ class vsc_file(object):
for i in self.vscset: for i in self.vscset:
i.emit_c() i.emit_c()
def emit_rst(self, fon): def emit_rst(self):
fo = open(fon, "w") fo = sys.stdout
for i in self.c: for i in self.c:
i.emit_rst(fo) i.emit_rst(fo)
...@@ -330,13 +347,13 @@ if __name__ == "__main__": ...@@ -330,13 +347,13 @@ if __name__ == "__main__":
fo = sys.stdout fo = sys.stdout
if len(args) != 1: if len(args) != 1:
print("Need exactly one filename argument") sys.stderr.write("Need exactly one filename argument\n")
exit(2) exit(2)
vf = vsc_file(args[0]) vf = vsc_file(args[0])
for f,v in optlist: for f,v in optlist:
if f == '-r': if f == '-r':
vf.emit_rst("_.rst") vf.emit_rst()
if f == '-h': if f == '-h':
vf.emit_h() vf.emit_h()
if f == '-c': if f == '-c':
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment