about summary refs log tree commit diff
path: root/src/supervision
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2018-03-20 15:18:27 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2018-03-20 15:18:27 +0000
commit3b8083f63e774b30963948778e01553d85cfea29 (patch)
tree015d66331767872b0b5831c2f924dcfb1551454d /src/supervision
parent26c5fee82736e56cff3d114ff9d6e3969d1ce061 (diff)
downloads6-3b8083f63e774b30963948778e01553d85cfea29.tar.gz
s6-3b8083f63e774b30963948778e01553d85cfea29.tar.xz
s6-3b8083f63e774b30963948778e01553d85cfea29.zip
Add throttling support to s6-svstat
Diffstat (limited to 'src/supervision')
-rw-r--r--src/supervision/s6-svstat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/supervision/s6-svstat.c b/src/supervision/s6-svstat.c
index 03ea004..d46c60a 100644
--- a/src/supervision/s6-svstat.c
+++ b/src/supervision/s6-svstat.c
@@ -35,7 +35,7 @@ struct funcmap_s
 
 static void pr_up (buffer *b, s6_svstatus_t const *st)
 {
-  buffer_putsnoflush(b, st->pid && !st->flagfinishing ? "true" : "false") ;
+  buffer_putsnoflush(b, st->pid && !st->flagfinishing ? st->flagthrottled ? "throttled" : "true" : "false") ;
 }
 
 static void pr_wantedup (buffer *b, s6_svstatus_t const *st)
@@ -210,6 +210,8 @@ static void legacy (s6_svstatus_t *st, int flagnum)
   buffer_putnoflush(buffer_1small, fmt, uint64_fmt(fmt, status.stamp.sec.x)) ;
   buffer_putnoflush(buffer_1small, " seconds", 8) ;
 
+  if (isup && status.flagthrottled)
+    buffer_putnoflush(buffer_1small, ", throttled", 11) ;
   if (isup && !normallyup)
     buffer_putnoflush(buffer_1small, ", normally down", 15) ;
   if (!isup && normallyup)