diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-18 20:59:46 (GMT) |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-18 20:59:46 (GMT) |
commit | 0e70e81133c25274fe2dd2309556b41357dd759b (patch) | |
tree | 9a680b36788ee1ad4e7ecc5ccfeb4494db9fdc72 /plugins/tests | |
parent | ce355c80cf6054bfa5e1dcf81f9e2183ef963ee1 (diff) | |
parent | 2ddc75e69db5a3dd379c896d8420c9af20ec1cee (diff) | |
download | monitoring-plugins-0e70e81133c25274fe2dd2309556b41357dd759b.tar.gz |
Merge branch 'master' into mysql_detect_mysqldumprefs/pull/1718/head
Diffstat (limited to 'plugins/tests')
22 files changed, 919 insertions, 311 deletions
diff --git a/plugins/tests/certs/.gitignore b/plugins/tests/certs/.gitignore new file mode 100644 index 0000000..79acaaa --- /dev/null +++ b/plugins/tests/certs/.gitignore | |||
@@ -0,0 +1,2 @@ | |||
1 | /*.csr | ||
2 | /*.srl | ||
diff --git a/plugins/tests/certs/client-cert.pem b/plugins/tests/certs/client-cert.pem new file mode 100644 index 0000000..5709750 --- /dev/null +++ b/plugins/tests/certs/client-cert.pem | |||
@@ -0,0 +1,22 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIDtDCCApwCAQIwDQYJKoZIhvcNAQELBQAwgaAxCzAJBgNVBAYTAkRFMRAwDgYD | ||
3 | VQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0b3Jp | ||
4 | bmcgUGx1Z2luczEkMCIGA1UEAwwbTW9uaXRvcmluZyBQbHVnaW5zIENsaWVudENB | ||
5 | MSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMub3JnMB4X | ||
6 | DTIxMDIyODIxMDIxMloXDTMwMTEyODIxMDIxMlowgZ4xCzAJBgNVBAYTAkRFMRAw | ||
7 | DgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0 | ||
8 | b3JpbmcgUGx1Z2luczEiMCAGA1UEAwwZTW9uaXRvcmluZyBQbHVnaW5zIENsaWVu | ||
9 | dDErMCkGCSqGSIb3DQEJARYcZGV2ZWxAbW9uaXRvcmluZy1wbHVnaW5zLm9yZzCC | ||
10 | ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAM3EiqfFPomm5dZQPGYG5SrF | ||
11 | rPvyqseXTzCkwUIUzGf+Sfm3s13zx7e3ije/04yKhTXgK59EQ793q7E2aWhSOz3s | ||
12 | hwKKdylFkOIyc5jgbAfF1/pLZMK209rLt/mMRksXCRXYrHdTjRMx1ev4C2407+8Y | ||
13 | 8qkf77DuYQmUqCQe7DPOvqLeagdw9JcLGmQNTKHg3fl6wyRl5K1Bsy+qXu2XvEjZ | ||
14 | 0Ng7n8LHjOUkTqUEJndOxci9gL5cHU5ttul/GW34dKOtTuMU/pQX6/ywYusOGVOx | ||
15 | RYI76OolRqj5BqbNctDIB/obe2RLo+UVx74/0jAxtH4XS23pYjO7NUpJcytsVG8C | ||
16 | AwEAATANBgkqhkiG9w0BAQsFAAOCAQEAYfaY5n4pCq0NWPCdeVVRr4nr+GAfv1TC | ||
17 | /PKcGuEoJZKt7TQT+OOA5yeZMZb53OvtA49D1r9aoJzWe946KElWOEBqxDRi5Cdr | ||
18 | wkqpwGcPT2RfAqA3/cvQZ1XsquboXrCf7ajdl5OC64bs2jkqCFh9gnxuI140g8Ar | ||
19 | Njol8BFxRPaYWOnwuQwmh/2t0FJqr3WSD85HrNqtxUSNGbTdSsvCfgF0v7QVkvLG | ||
20 | 3/cbx6z5hxzj2JUjhMnCvn+EbasoJt4xyBFvg67Q2229SMwu9YNqS63GVoKUqhCB | ||
21 | 4Gl5v31qx8dAFKuRvnez3ze/6oohwmakZkst4hcQdgZocHhzesvKlg== | ||
22 | -----END CERTIFICATE----- | ||
diff --git a/plugins/tests/certs/client-key.pem b/plugins/tests/certs/client-key.pem new file mode 100644 index 0000000..09b6761 --- /dev/null +++ b/plugins/tests/certs/client-key.pem | |||
@@ -0,0 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDNxIqnxT6JpuXW | ||
3 | UDxmBuUqxaz78qrHl08wpMFCFMxn/kn5t7Nd88e3t4o3v9OMioU14CufREO/d6ux | ||
4 | NmloUjs97IcCincpRZDiMnOY4GwHxdf6S2TCttPay7f5jEZLFwkV2Kx3U40TMdXr | ||
5 | +AtuNO/vGPKpH++w7mEJlKgkHuwzzr6i3moHcPSXCxpkDUyh4N35esMkZeStQbMv | ||
6 | ql7tl7xI2dDYO5/Cx4zlJE6lBCZ3TsXIvYC+XB1Obbbpfxlt+HSjrU7jFP6UF+v8 | ||
7 | sGLrDhlTsUWCO+jqJUao+QamzXLQyAf6G3tkS6PlFce+P9IwMbR+F0tt6WIzuzVK | ||
8 | SXMrbFRvAgMBAAECggEBALtc2pB3p0E6KpAiEU0pvCRdSO1FgsIpAd+eNadRPur2 | ||
9 | fi+XWQkUwGeGBaJL1npja3aqP65PP40pj7nWfNaUAgOZyznCEU0QXiPJor6yo0vU | ||
10 | l5v+aKpwRao107i0RRF80TYGTMx+1LeEqnCqNOZN56gERHlBbkTiWpOZvBzf1143 | ||
11 | oegTcyM6+Ee6+FYNhHaDyIYD0md1S2wGR+IBPet6HwWiakLNKahFPa7lOLIKfmmD | ||
12 | iTtifcbf4724wSe44a0uTeP4JrquZSeIKakm8MEmffmYqpycnaakYefd0Xc5UEsH | ||
13 | +VbhKpOWGY3d8FKHqUsTa+6QyXb2uFPo6A+yWm0pdJECgYEA7Prd5sbWACvXOcHT | ||
14 | ONDBAgyfAVDQwOXi3D4dk6D5mg+/jxl5ZQY5slszJrwsLFtoEzXtYpNfTy3cpNOp | ||
15 | JLbBDZYnqty+5tD8t3/Zv2IBXCAgvuk5CgfJWP5FNAfiyUEE6Vbp6J/5/vAnODsa | ||
16 | fxZryN5UsH0X8ew7AlbfcVNyj4kCgYEA3khetIgn+GR6sv9jFRdCT6aJbp0xMsms | ||
17 | 6F4v3L5FG4Kp+SwDHL1bVOhieJ5g8odYp9hDbgTEEqbJfNmyCOu9+OQmZ/mztku7 | ||
18 | 6reU8HhYBIvi+hFeJmvqKpdIgU0Zveg4Bst5QordmhPk8AHjBC4xvQ++uh7rwYKd | ||
19 | WVsS08bGDjcCgYEAlAuNARUKsASzakOqHv5a9VrJIttH7povBYRQmd+gzxwzgcRa | ||
20 | UEB5XvEWnYZE2lkoRYgVCtYiXqa6BsasDmGVbVV25okNQckhd8mJUMR7MQBpNJsi | ||
21 | pR+EK/J9bSnYBf52gQdpDYiTdy60ca6KuQZaw5wRsEgV426+1pFK+dM16HECgYBY | ||
22 | cTsdYb9lmbUoW201CxgbUQwFsw3MQ2pE2pT4o8wjcg3nUpe6a61XT08+5uV0Gl4w | ||
23 | CmBp+gN52Fr7DjNEUWg5C64sWLIkqmWOspTUSU3cITyiex6W8wEtCRyUNfU0Fp2U | ||
24 | Nol87HvXvmqtBFMraqXnr8gXjg4H5MxurUoEcWaEaQKBgCT4iIGZwW0Qf2rkFC7B | ||
25 | xObzVGefivVVbaf8/c/LRO8TMLdnExkShMOmCzHeHV4mMEZDLbMOusHCI7xm10EX | ||
26 | l3L1I1Kyqnhm1RH3e7TVWgkTmIDW3V5Fgrhm1jx5Iz6et4sb4Uh+bZq9tTLyqfZY | ||
27 | 8s0yJUrfpjRggfk7eUs5s7aY | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/plugins/tests/certs/clientca-cert.pem b/plugins/tests/certs/clientca-cert.pem new file mode 100644 index 0000000..9ce7cd7 --- /dev/null +++ b/plugins/tests/certs/clientca-cert.pem | |||
@@ -0,0 +1,25 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIEIzCCAwugAwIBAgIUL9Jfp5zv5B29N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MwHwYDVR0jBBgwFoAUtsP9Z3fKkhmFp97Kh/cW/UqH | ||
18 | MIMwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAQEApO5o+YECwTEv | ||
19 | s+elDJZQ20UYwDSiU9Lpf4EcdnRv6FAb5UlhfRTH3ZdKCc/HX7kcKuy3PsF+b8Pw | ||
20 | EusoKito9OlNEOF5HYAI9/J54/qceqn+SC0INsISeE19PvT0dma7lBSj4OvBv0IS | ||
21 | GYbdztVaKLWqYgYs0mcEzteUc4MZcy1/C+Ru1i1Kp2s9/vIeAw2PV2+kpWtw88Pb | ||
22 | FRJomGngP/hQdwniayCltG/Q1smS4iFEHNI5ayLZj1qJGMHwzqGiRr4KknJKfHzv | ||
23 | fl4NQaFyMY31s1FRIS6QVIRFHVzUAlKZTdzwqEJygg3fUS9n9uDBnyDI/sW7DQuj | ||
24 | yjSmYRS1hw== | ||
25 | -----END CERTIFICATE----- | ||
diff --git a/plugins/tests/certs/clientca-key.pem b/plugins/tests/certs/clientca-key.pem new file mode 100644 index 0000000..a939f03 --- /dev/null +++ b/plugins/tests/certs/clientca-key.pem | |||
@@ -0,0 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDLGJawauwkUfDd | ||
3 | VHSmoe+JdR9t8ozDwtoLEjkRBl8iewxWQEgZYRa0VbqoO4A6wx3Oyso6dBE023zn | ||
4 | a2z/RTP77PzPKyhq4AalzgmcJm4zkDUNTkIVcHHDoDH7V+3dSxO3wLqR8t+zyY8J | ||
5 | u01WoAesysioPGw1JFHFBKqTOnW8PyvBIpxsHWG7b6W63VsSox7t2nz2Mo61zob/ | ||
6 | W0dQVC4sAYWhf+qT3I+xyZA3Mvphss/ib2v/jXo+zFawB/Jj3uGahijqZIK57kuZ | ||
7 | 5qc6yN/grOr3SEglHCumJQabEaNb608sSFAFnDoLbAfI3vhgglhfbFETPa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zjzu4Fhi | ||
23 | bj1tgA8xhzSs3fOR5phlQkKsrWtQfJtFGm8CnEn7LBDlVMsrN7Dr/qRrEuro4HHy | ||
24 | GDbq+8y2fO5glr955BqLMOadprf0imRnDeQ0OLffAoGBAJio+X+xpglgMOC4BeH9 | ||
25 | 9LcYi9nUEw8MDJNGo9/3e0XKA7spd3HShLDvt8YZhFJ2m168qBpGfezuw0+jpWxy | ||
26 | PV9q0dokAgDx4pvCzIKaptZ1D30CWXJZHq25VK1tA41PCUIOh8JD5+R0MpxA5rn2 | ||
27 | DbqL4Vq7K7K0imGENYhHdyM+ | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/plugins/tests/certs/clientchain-cert.pem b/plugins/tests/certs/clientchain-cert.pem new file mode 100644 index 0000000..acd1e3e --- /dev/null +++ b/plugins/tests/certs/clientchain-cert.pem | |||
@@ -0,0 +1,45 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIIDuTCCAqECAQQwDQYJKoZIhvcNAQELBQAwgaAxCzAJBgNVBAYTAkRFMRAwDgYD | ||
3 | VQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0b3Jp | ||
4 | bmcgUGx1Z2luczEkMCIGA1UEAwwbTW9uaXRvcmluZyBQbHVnaW5zIENsaWVudENB | ||
5 | MSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMub3JnMB4X | ||
6 | DTIxMDIyODIxMDIxMloXDTMwMTEyODIxMDIxMlowgaMxCzAJBgNVBAYTAkRFMRAw | ||
7 | DgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZNdW5pY2gxGzAZBgNVBAoMEk1vbml0 | ||
8 | b3JpbmcgUGx1Z2luczEnMCUGA1UEAwweTW9uaXRvcmluZyBQbHVnaW5zIENsaWVu | ||
9 | dENoYWluMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9yaW5nLXBsdWdpbnMu | ||
10 | b3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAphvoJBbi/rDvm3+X | ||
11 | 8xok0sLCJvCRuUpSbU5wEmREQlkoOGmWK4l6r1JyOphKRBo8+n2MxPiCMvAmTrqx | ||
12 | VlBmkcmyrwWj392Nga+2SLWTziASk5nFrrhV6U79PkgXnETV2Wk1/FNVIFkB8N+B | ||
13 | undsTce8LLiCs7hfA5CK7ctJg8fqsAsmgKBNGzBRWwkbvxZPd6xlY6foIJeD7PQ2 | ||
14 | elvTmrD6WXSZq7GshFpDEkL3AifqrPMdsTnbBpyGgJ/fBM1b2dx9k53e25mgEQmn | ||
15 | iSuYQxn08BsUT0FOvav8ksZLBQz859fuqCtwhikpODO635fD9zK5YkBPlVl+/5xo | ||
16 | SvKOywIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQBh4zeSKjENfY+VDLtPssaNQz2a | ||
17 | R1ioY40lZ0WoihDSrfG32dqTK/R2YsLKBABjJ7uRYS1NIBMrtS2OktK8BWD5IUTF | ||
18 | FuGuWilu6IWiTKZrLiZh1rsilNDVqwhorRPxDnbF+qVt9EMIvzKnKdJLGF+CWHN9 | ||
19 | yYJDeTD8MK5uR7zUJR3PsgW4ve5pFTi7z2UJ/xRvgOds6bmeeQnvaWDEL7k2+hrr | ||
20 | 0G899A086NL3htzaOnIllg0xo2D1o4ToncAJn+cUQVJmHZSg9HYiD4Lg3z8uXPAl | ||
21 | rt/MX7dBm4dnImLXbSg7N3e8FdUtz+kZT9z+beKAeIe9JTbpxtsVUTzUZBBA | ||
22 | -----END CERTIFICATE----- | ||
23 | -----BEGIN CERTIFICATE----- | ||
24 | MIID2jCCAsKgAwIBAgIBAzANBgkqhkiG9w0BAQsFADCBoDELMAkGA1UEBhMCREUx | ||
25 | EDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwSTW9u | ||
26 | aXRvcmluZyBQbHVnaW5zMSQwIgYDV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MvoSGNUphjrkdpviff2POkLly7a5RrR1X3qt | ||
42 | Dai6eYbeMCr9NdgW7AZ5++/sKlFoe+zVk/Ed31s4D2lh3awrApZhVgcoquPmEwpt | ||
43 | gm+OgRmHw50U4SF3ZaJPwDyLMbx+clH/bgUg0+Za9e53Br1NtGKmw7hh/7CG/hy0 | ||
44 | yxeLd930pH4vZu7s0XM56N/ckkfUzRkAH8dSmhH4 | ||
45 | -----END CERTIFICATE----- | ||
diff --git a/plugins/tests/certs/clientchain-key.pem b/plugins/tests/certs/clientchain-key.pem new file mode 100644 index 0000000..0263604 --- /dev/null +++ b/plugins/tests/certs/clientchain-key.pem | |||
@@ -0,0 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCmG+gkFuL+sO+b | ||
3 | f5fzGiTSwsIm8JG5SlJtTnASZERCWSg4aZYriXqvUnI6mEpEGjz6fYzE+IIy8CZO | ||
4 | urFWUGaRybKvBaPf3Y2Br7ZItZPOIBKTmcWuuFXpTv0+SBecRNXZaTX8U1UgWQHw | ||
5 | 34G6d2xNx7wsuIKzuF8DkIrty0mDx+qwCyaAoE0bMFFbCRu/Fk93rGVjp+ggl4Ps | ||
6 | 9DZ6W9OasPpZdJmrsayEWkMSQvcCJ+qs8x2xOdsGnIaAn98EzVvZ3H2Tnd7bmaAR | ||
7 | CaeJK5hDGfTwGxRPQU69q/ySxksFDPzn1+6oK3CGKSk4M7rfl8P3MrliQE+VWX7/ | ||
8 | nGhK8o7LAgMBAAECggEAAfTqMyKh4eYrrGVAYPi53lG0/8htrwUVG3yFDXJo628p | ||
9 | biCwSCsCavZJqi8JEOxOM5UvB1L2FauGh/7i/+VKkAUUOcOTPpvZguGTACBDcXYn | ||
10 | Qd3Z2kkJmgn4Kbenr4uQCVOX8zT4F710rGW1nYCyoefsa4pw37UYSW52dH6kiwzW | ||
11 | 9k4X251nDMl/twBdOcjZbL768IEa5l4nySLpUNwfrVbSb1NzBoH0dVioh3DTLjt6 | ||
12 | gaShW4eIpaKczht1U97n6/7WNLl6vHX/mR99k/py8OhzhR1ccYpd2IfSHAWyQT0M | ||
13 | K8BoNnkjICrr9oc0FCr2BVJa3IzKHlhukF4GTZiGYQKBgQDWCHTwAmwL4FFEBVhj | ||
14 | pZne/sjaZc8TzPPxA8SkmxwDIZrM7tSu7qUuYgWTM432jZbLILWTyGfXf2PpqyF6 | ||
15 | wOpoBJj1ETkre8ZfRmYvsSvS5vtjF3Drszol+XvZnOclfB5VG3m5P2vYkQ8wI9OE | ||
16 | Y5jUBgDj0RsCNd8QnrC1u54U/wKBgQDGrd5y8S9kUT0P0lkZit7bYjSPJExtClXt | ||
17 | V7YNTjELrVCdc0jranxBWaub8NP3e6TGTi9HiQWvk2eOAS2qyccqlK4+YAK5XO3D | ||
18 | EpFUNNcClq8CErw2POuCAKajrPuSp6vd6q8h4lTzDExVctQS4R9fRKKFBKkPUV5G | ||
19 | UiKFllnKNQKBgQDBGIQXfLfpxwjKK2BhFihKDOc8UhmOrZtvV4zzTJTrJkg4l0f+ | ||
20 | QoN34ytQcHSleXwP6oSmvWkh/GYxjBj6XE2eZndwsYc4ecSwdB0A7gCxl345Gg7g | ||
21 | NqRBWmGoJGxNXzsmYVFiFZvAmK5xKgFMMWbR8lCfOCn7xopmviSC8K9gFQKBgFRb | ||
22 | KmH/SbH8VELNews/TVQ0pEBKlzCM/OLjJOcNVgGxOtM/Say677sHibeST0168AFK | ||
23 | 3QQwh3t+yK8gjPVA6xGHQ1w0g7OUY1c6IP5x2QC+XdwxfDxDLXNrN1WzcrVX/78f | ||
24 | j/CBGrR/ekGlmanSb/GRQLfdvLJGSBLveLzjk4gpAoGBANN9RUm/aRz3dDBWex46 | ||
25 | kJ15xKJfLZiUeyDvY5+5d7YF4/tw5LU4XmKQNhiojHecykrTzPUMaGyMrbMPNn32 | ||
26 | WFW9CKMjuBEwWpMDJJb1/5NLEvpwu++sr7bUPZkQl76ot6OqgNHodbP8ATqrNr80 | ||
27 | 5b8FrEN1LyfkTbabxNyAWcA0 | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/plugins/tests/certs/clientintermediate-cert.pem b/plugins/tests/certs/clientintermediate-cert.pem new file mode 100644 index 0000000..608a8fa --- /dev/null +++ b/plugins/tests/certs/clientintermediate-cert.pem | |||
@@ -0,0 +1,23 @@ | |||
1 | -----BEGIN CERTIFICATE----- | ||
2 | MIID2jCCAsKgAwIBAgIBAzANBgkqhkiG9w0BAQsFADCBoDELMAkGA1UEBhMCREUx | ||
3 | EDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwSTW9u | ||
4 | aXRvcmluZyBQbHVnaW5zMSQwIgYDVQQDDBtNb25pdG9yaW5nIFBsdWdpbnMgQ2xp | ||
5 | ZW50Q0ExKzApBgkqhkiG9w0BCQEWHGRldmVsQG1vbml0b3JpbmctcGx1Z2lucy5v | ||
6 | cmcwHhcNMjEwMjI4MjEwMjEyWhcNMzAxMTI4MjEwMjEyWjCBqjELMAkGA1UEBhMC | ||
7 | REUxEDAOBgNVBAgMB0JhdmFyaWExDzANBgNVBAcMBk11bmljaDEbMBkGA1UECgwS | ||
8 | TW9uaXRvcmluZyBQbHVnaW5zMS4wLAYDVQQDDCVNb25pdG9yaW5nIFBsdWdpbnMg | ||
9 | Q2xpZW50SW50ZXJtZWRpYXRlMSswKQYJKoZIhvcNAQkBFhxkZXZlbEBtb25pdG9y | ||
10 | aW5nLXBsdWdpbnMub3JnMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA | ||
11 | 6rUgOZ9pAOxrcgeeOT3Vmu1YmY2O/C9tXhpKzDzjTaWUzcdDg00KdsjXfgbDzSiV | ||
12 | uvMzjX63aKpmqeFG+05D2VzQGit3knqerUgl10FnTotiJGF5CU5/gY1aPxTJ7rj2 | ||
13 | tD6LINBkJcPTyQ4MoJT19pssvCax9erY1RxoXxLblJ+31C+VvrftdmBP4nVKXK26 | ||
14 | 4anb1oUQhkgpXpJimJBmF+v7NbDs1Wh21Be80KXUh9SKgePhSQblr2QlRcA7jLgJ | ||
15 | 4PMjZ+KYF+da+4RB7s+DvTXVDMn9AL84E1w5Ut1E8XZV+u4RjWPvNdhK/7GnuxOR | ||
16 | C9SdxonqkPQ8hiI7thP9bQIDAQABoxMwETAPBgNVHRMBAf8EBTADAQH/MA0GCSqG | ||
17 | SIb3DQEBCwUAA4IBAQDKQeiDbyr0/7sEhX33MmTDv84GeWgKl9qqHecx+d/0vImb | ||
18 | c8XHK0PDa4lVqo/BW4P1hjKzpt2DW35kbOhuqGqM0lasIczef43aCDDEBLwstAe6 | ||
19 | qMoyWGVGoAQbpwT3li2pMrsIYoPwMvoSGNUphjrkdpviff2POkLly7a5RrR1X3qt | ||
20 | Dai6eYbeMCr9NdgW7AZ5++/sKlFoe+zVk/Ed31s4D2lh3awrApZhVgcoquPmEwpt | ||
21 | gm+OgRmHw50U4SF3ZaJPwDyLMbx+clH/bgUg0+Za9e53Br1NtGKmw7hh/7CG/hy0 | ||
22 | yxeLd930pH4vZu7s0XM56N/ckkfUzRkAH8dSmhH4 | ||
23 | -----END CERTIFICATE----- | ||
diff --git a/plugins/tests/certs/clientintermediate-key.pem b/plugins/tests/certs/clientintermediate-key.pem new file mode 100644 index 0000000..13f6887 --- /dev/null +++ b/plugins/tests/certs/clientintermediate-key.pem | |||
@@ -0,0 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | ||
2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDqtSA5n2kA7Gty | ||
3 | B545PdWa7ViZjY78L21eGkrMPONNpZTNx0ODTQp2yNd+BsPNKJW68zONfrdoqmap | ||
4 | 4Ub7TkPZXNAaK3eSep6tSCXXQWdOi2IkYXkJTn+BjVo/FMnuuPa0Posg0GQlw9PJ | ||
5 | DgyglPX2myy8JrH16tjVHGhfEtuUn7fUL5W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WVQde3blmJWmQFi0UE9mtaWkyY | ||
21 | Fg+WoFR7bQOQNHhs/lpkPjnC2dhFJVWLtLiuj9mL5rEjlMab/T5XXhZJAoGBAMEP | ||
22 | FZ8fXbPGrTQqSwPfWpZFcF9zvbynEmkFM/uGRMddcNZnNXSqWJ7nrFNLTuEGvW2g | ||
23 | DU4A6zPV/YQrDz4hRjmHBZOCFlSyZbUvpY4yFAQ7/p66AY+kiHZNwT5vi1P5Luvs | ||
24 | qyaNsZcnRMR+i7rg2EeHv0aNvNdMlNBvL5KikNINAoGAU2P/phdwJOUcqgHavQcQ | ||
25 | ureTEyZ5i5AeNomNeHSj0slG24V9nxOqEL7D00JKln7oAPovYBUWocEnF39uBJe0 | ||
26 | p0Hy7fCCK6EI8/0QyiQuuZmJfDEEvjQqE6irONNH63r2UwDEpDNGFvGsZNuWHLZc | ||
27 | SXADu5oSNu6o6IydiyOx528= | ||
28 | -----END PRIVATE KEY----- | ||
diff --git a/plugins/tests/certs/expired-cert.pem b/plugins/tests/certs/expired-cert.pem index 77a9166..87fc8e4 100644 --- a/plugins/tests/certs/expired-cert.pem +++ b/plugins/tests/certs/expired-cert.pem | |||
@@ -1,24 +1,24 @@ | |||
1 | -----BEGIN CERTIFICATE----- | 1 | -----BEGIN CERTIFICATE----- |
2 | MIIEETCCAvmgAwIBAgIUFDsP6WnV/uqeQMpD/DYSqouE13kwDQYJKoZIhvcNAQEL | 2 | MIIEETCCAvmgAwIBAgIUVDKkhcUoYFnjYCw12tScPIqQzqIwDQYJKoZIhvcNAQEL |
3 | BQAwgZcxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN | 3 | BQAwgZcxCzAJBgNVBAYTAkRFMRAwDgYDVQQIDAdCYXZhcmlhMQ8wDQYDVQQHDAZN |
4 | dW5pY2gxGzAZBgNVBAoMEk1vbml0b3JpbmcgUGx1Z2luczEbMBkGA1UEAwwSTW9u | 4 | dW5pY2gxGzAZBgNVBA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|
20 | 2bxTkhLyQeU8NWPuDBqDszo2GOaFTv+lm36LEKiAfqB1tjQVePSkycdrWIhkamBV | 20 | 4LXoWz9Benx0bAIeuDbNAhOvA4H4aIz8UrD9lKFvKdRp42gPMLtMEbzbLcBdT95D |
21 | EgMe6uHLdU7QQk1ajQfrBdakN1beqki/dKieA6gm+XF/QS4SSYINmsHB/2X5cT9U | 21 | 6BX7EhYm7vTnpitLPgFxVCsJ1JFqv2AQfUm+IkqQkezPs5x0tWLyrvCDNRGJ0kfv |
22 | b/KMB8xurCnuJQuk1P4VsSkJCOSeHjWZgK9pKNdsIJZr4wDVfhjQgU0XT6xakSf7 | 22 | UuowpUZXDOh3k1vB+xaSOFviieLaCW8TSdd5FZgI2HQj4e6vCKsMGuKKZXrMUTI/ |
23 | eCaHtO0VKsbLZoiTmpxidjsdYiXyeKYIQNtUpTjyJ5V/cZsq9w== | 23 | qtrFlUfsOuwourfC5LMHtCyYo5B3uvAWT1eTXxhrGqyleSlxJQ== |
24 | -----END CERTIFICATE----- | 24 | -----END CERTIFICATE----- |
diff --git a/plugins/tests/certs/expired-key.pem b/plugins/tests/certs/expired-key.pem index c1510b2..c5bba56 100644 --- a/plugins/tests/certs/expired-key.pem +++ b/plugins/tests/certs/expired-key.pem | |||
@@ -1,28 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | 1 | -----BEGIN PRIVATE KEY----- |
2 | MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDJ4crAoWMlZRdg | 2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDCDV2YZPetWoxt |
3 | cqyKzKlR/10eUg9AAhLIY/UFfpQvbpku8TqQpvHcsVD1bY84ahBaXMWIHWygZ5VY | 3 | 5VZYvLwQCKr2t7TsAXyxMRHL2ghgXkRSr1/TE7nebDCohZXvs72YX33+QMUZC5A0 |
4 | N3RTQm1Z0IqY5dZ1xem6lCVNJS1EIwNCR+os3wZ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zt/JQTZWSWNaroF |
20 | u3/lxDULMbWj4U6VvRmbKOKDC+jY887Gq7lc0cff0yROxwqY3sCnwo3crg7QUmp7 | 20 | EG/ElUaWIoUZCEW5oglg/0Q0rYYGF4DTCingkhrx7ReVF70BIbSsBzi15d8nKNbY |
21 | Nb5S8G3qoCSfndcq96wm/Me/O28uCbycVJfUdchY8uRUHIHYbP0FOBQBAoGBAMgh | 21 | t4I3RCF4fyggYe1TmsysXS2DH85/gkToVY7oo2CvF0uJwi8vXnTNDDNkiwKBgHKs |
22 | fPX4imaKr1DovDObVkK87EDDnU84GBm5MtDs3qrkVd3aIVK0Aw7HoAdSN58tI12i | 22 | mAc94BHt9GtnGzQepx0I7TvvjAe2MZwqlt+uojKdS8mfWXMHscGDeYVxdRMqEoUC |
23 | YiPmVVqJQhhjh6tsOuAvZdTj8ngdrbICbrsHFZt6an+A5LIgHyQ0iy+hiPdLCdvG | 23 | YQfnvfYyjDKaj/XxyE3C237gQsICTyh0hHdpmepIeidIyWdumyDOFZVPF+ylWvM4 |
24 | ImTeKKMmyr04Bs1upueWVO0xw2VoMbcY4Py+NUEBAoGASQqedfCSKGLT+5lLZrhP | 24 | kpFQQb/QRWHmKyti2KCBLw5G/fUaBryLGfprE6ZBAoGBANy5rr41A679UQZ0abev |
25 | CbFVMmswEPjBcRb1trcuA09vfExn9FfUNFnnw3i9miprED5kufvAjb+6nduXizKg | 25 | bOZb7YWOHYp/wReJaQbvLAyR30os3aEY/0ht9S+OWdrgGMezPKvsx2Sqr/CwoFXI |
26 | 7HQYHCwVvakgtXgbiDMaNgYZcjWm+MdnfiwLJjJTO3DfI1JF2PJ8y9R95DPlAkDm | 26 | esiklpknr11maEPxnQJYi4FYiXS1a3NCg7yBvKzFEgx2XnMAC3s6zhuZXaFq4zNu |
27 | xH3OV8KV4UiTEVxS7ksmGzY= | 27 | pm5Btrq/NZqtVXovS+UhGLvJ |
28 | -----END PRIVATE KEY----- | 28 | -----END PRIVATE KEY----- |
diff --git a/plugins/tests/certs/ext.cnf b/plugins/tests/certs/ext.cnf new file mode 100644 index 0000000..d09cee1 --- /dev/null +++ b/plugins/tests/certs/ext.cnf | |||
@@ -0,0 +1,2 @@ | |||
1 | [ client_ca ] | ||
2 | basicConstraints = critical, CA:true | ||
diff --git a/plugins/tests/certs/generate-certs.sh b/plugins/tests/certs/generate-certs.sh new file mode 100755 index 0000000..78660a2 --- /dev/null +++ b/plugins/tests/certs/generate-certs.sh | |||
@@ -0,0 +1,63 @@ | |||
1 | #!/bin/sh -e | ||
2 | # | ||
3 | # Recreates the https server certificates | ||
4 | # | ||
5 | # Set the GEN_EXPIRED environment variable to also regenerate | ||
6 | # the expired certificate. | ||
7 | |||
8 | cd "$(dirname "$0")" | ||
9 | trap 'rm -f *.csr; rm -f clientca-cert.srl' EXIT | ||
10 | |||
11 | subj() { | ||
12 | c="DE" | ||
13 | st="Bavaria" | ||
14 | l="Munich" | ||
15 | o="Monitoring Plugins" | ||
16 | cn="Monitoring Plugins" | ||
17 | emailAddress="devel@monitoring-plugins.org" | ||
18 | |||
19 | if [ -n "$1" ]; then | ||
20 | # Add to CN | ||
21 | cn="$cn $1" | ||
22 | fi | ||
23 | |||
24 | printf "/C=%s/ST=%s/L=%s/O=%s/CN=%s/emailAddress=%s" \ | ||
25 | "$c" "$st" "$l" "$o" "$cn" "$emailAddress" | ||
26 | } | ||
27 | |||
28 | # server | ||
29 | openssl req -new -x509 -days 3560 -nodes \ | ||
30 | -keyout server-key.pem -out server-cert.pem \ | ||
31 | -subj "$(subj)" | ||
32 | # server, expired | ||
33 | # there is generally no need to regenerate this, as it will stay epxired | ||
34 | [ -n "$GEN_EXPIRED" ] && TZ=UTC faketime -f '2008-01-01 12:00:00' \ | ||
35 | openssl req -new -x509 -days 1 -nodes \ | ||
36 | -keyout expired-key.pem -out expired-cert.pem \ | ||
37 | -subj "$(subj)" | ||
38 | |||
39 | # client, ca | ||
40 | openssl req -new -x509 -days 3560 -nodes \ | ||
41 | -keyout clientca-key.pem -out clientca-cert.pem \ | ||
42 | -subj "$(subj ClientCA)" | ||
43 | echo "01" >clientca-cert.srl | ||
44 | # client | ||
45 | openssl req -new -nodes \ | ||
46 | -keyout client-key.pem -out client-cert.csr \ | ||
47 | -subj "$(subj Client)" | ||
48 | openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \ | ||
49 | -in client-cert.csr -out client-cert.pem | ||
50 | # client, intermediate | ||
51 | openssl req -new -nodes \ | ||
52 | -keyout clientintermediate-key.pem -out clientintermediate-cert.csr \ | ||
53 | -subj "$(subj ClientIntermediate)" | ||
54 | openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \ | ||
55 | -extfile ext.cnf -extensions client_ca \ | ||
56 | -in clientintermediate-cert.csr -out clientintermediate-cert.pem | ||
57 | # client, chain | ||
58 | openssl req -new -nodes \ | ||
59 | -keyout clientchain-key.pem -out clientchain-cert.csr \ | ||
60 | -subj "$(subj ClientChain)" | ||
61 | openssl x509 -days 3560 -req -CA clientca-cert.pem -CAkey clientca-key.pem \ | ||
62 | -in clientchain-cert.csr -out clientchain-cert.pem | ||
63 | cat clientintermediate-cert.pem >>clientchain-cert.pem | ||
diff --git a/plugins/tests/certs/server-cert.pem b/plugins/tests/certs/server-cert.pem index b84b91d..d1249ef 100644 --- a/plugins/tests/certs/server-cert.pem +++ b/plugins/tests/certs/server-cert.pem | |||
@@ -1,24 +1,24 @@ | |||
1 | -----BEGIN CERTIFICATE----- | 1 | -----BEGIN CERTIFICATE----- |
2 | MIIEBjCCAu6gAwIBAgIJANbQ5QQrKhUGMA0GCSqGSIb3DQEBCwUAMIGXMQswCQYD | 2 | MIIEETCCAvmgAwIBAgIUZwOhY4myaCUaPek3NM+MxbLG9vwwDQYJKoZIhvcNAQEL |
3 | VQQGEwJERTEQMA4GA1UECAwHQmF2YXJpYTEPMA0GA1UEBwwGTXVuaWNoMRswGQYD | 3 | BQAwgZcxCzAJBgNVBAYTAkRFMRAwDgYDVQQ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9vQWvy24xKJpAOdj/iLRHCUOG+Pf5fA6+/FiuqXr6gE2/lm0eC58BNONr | 19 | VxKBgQwfnjSp5A8d5+uTQ9s3QDabw8v7YeSrzYXbbjuWZ61mnl84tzOQ8LMeESnC |
20 | E5OzjQ/VoQ8RX4hDntgu6FYbaVa/vhwn16igt9qmdNGGZXf2/+DM3JADwyaA4EK8 | 20 | CBXRCxB8Ow22WsVTVJq279SGYT+cZrdsmqGVWDi1A0C5kH+XTLAioG5CZmmxemD/ |
21 | vm7KdofX9zkxXecHPNvf3jiVLPiDDt6tkGpHPEsyP/yc+RUdltUeZvHfliV0cCuC | 21 | S92ZoRxGyYfg33r+3X6EMcEYtHKGxCUa3EPcPOL4dq2F3nOnyjiWPZm3786H3NY2 |
22 | jJX+Fm9ysjSpHIFFr+jUMuMHibWoOD8iy3eYxfCDoWsH488pCbj8MNuAq6vd6DBk | 22 | nsYwrEhAdUFtbYSsV5O0c/Zlc33fmTfh654ab35io1DtwmFo7q8J532dUE007EN0 |
23 | bOZxDz43vjWuYMkwXJTxJQh7Pne6kK0vE1g= | 23 | mIQmhdrjNJJHIftgSt0fuN5m48oLOnX7vvkz+X0WLWfVTtMr0w== |
24 | -----END CERTIFICATE----- | 24 | -----END CERTIFICATE----- |
diff --git a/plugins/tests/certs/server-key.pem b/plugins/tests/certs/server-key.pem index 1194755..0de63f8 100644 --- a/plugins/tests/certs/server-key.pem +++ b/plugins/tests/certs/server-key.pem | |||
@@ -1,28 +1,28 @@ | |||
1 | -----BEGIN PRIVATE KEY----- | 1 | -----BEGIN PRIVATE KEY----- |
2 | MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCoFdsqfKULybjf | 2 | MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDb/d4EDhYbrHMt |
3 | miRnQHuh3dLY2rrXgj3DSHDPdlizhevUy00mKJ9Vw6J+LR04eGeXeJQ/G37BsxVQ | 3 | 8zrFxbLDF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KIJ0wOjajLufSjPNCe0ZTRn32XusZUn |
27 | N0wdmCAqlQwHR13+F1zrAD7V | 27 | nYGB5/QXYr5WGV9YhAkRsFJYgA== |
28 | -----END PRIVATE KEY----- | 28 | -----END PRIVATE KEY----- |
diff --git a/plugins/tests/check_curl.t b/plugins/tests/check_curl.t index 29cb03f..72f2b7c 100755 --- a/plugins/tests/check_curl.t +++ b/plugins/tests/check_curl.t | |||
@@ -21,7 +21,7 @@ use FindBin qw($Bin); | |||
21 | 21 | ||
22 | $ENV{'LC_TIME'} = "C"; | 22 | $ENV{'LC_TIME'} = "C"; |
23 | 23 | ||
24 | my $common_tests = 72; | 24 | my $common_tests = 73; |
25 | my $ssl_only_tests = 8; | 25 | my $ssl_only_tests = 8; |
26 | # Check that all dependent modules are available | 26 | # Check that all dependent modules are available |
27 | eval "use HTTP::Daemon 6.01;"; | 27 | eval "use HTTP::Daemon 6.01;"; |
@@ -200,6 +200,14 @@ sub run_server { | |||
200 | $c->send_basic_header; | 200 | $c->send_basic_header; |
201 | $c->send_crlf; | 201 | $c->send_crlf; |
202 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host'))); | 202 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host'))); |
203 | } elsif ($r->url->path eq "/chunked") { | ||
204 | my $chunks = ["chunked", "encoding", "test\n"]; | ||
205 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, sub { | ||
206 | my $chunk = shift @{$chunks}; | ||
207 | return unless $chunk; | ||
208 | sleep(1); | ||
209 | return($chunk); | ||
210 | })); | ||
203 | } else { | 211 | } else { |
204 | $c->send_error(HTTP::Status->RC_FORBIDDEN); | 212 | $c->send_error(HTTP::Status->RC_FORBIDDEN); |
205 | } | 213 | } |
@@ -228,23 +236,25 @@ SKIP: { | |||
228 | skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https}; | 236 | skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https}; |
229 | run_common_tests( { command => "$command -p $port_https", ssl => 1 } ); | 237 | run_common_tests( { command => "$command -p $port_https", ssl => 1 } ); |
230 | 238 | ||
239 | my $expiry = "Thu Nov 28 21:02:11 2030 +0000"; | ||
240 | |||
231 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); | 241 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); |
232 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); | 242 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); |
233 | is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on Fri Feb 16 15:31:44 2029 +0000.", "output ok" ); | 243 | is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on $expiry.", "output ok" ); |
234 | 244 | ||
235 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); | 245 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); |
236 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); | 246 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); |
237 | like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" ); | 247 | like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" ); |
238 | 248 | ||
239 | # Expired cert tests | 249 | # Expired cert tests |
240 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); | 250 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); |
241 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); | 251 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); |
242 | like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" ); | 252 | like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" ); |
243 | 253 | ||
244 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 254 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
245 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 255 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |
246 | is( $result->output, | 256 | is( $result->output, |
247 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.', | 257 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 12:00:00 2008 +0000.', |
248 | "output ok" ); | 258 | "output ok" ); |
249 | 259 | ||
250 | } | 260 | } |
@@ -470,7 +480,8 @@ sub run_common_tests { | |||
470 | local $SIG{ALRM} = sub { die "alarm\n" }; | 480 | local $SIG{ALRM} = sub { die "alarm\n" }; |
471 | alarm(2); | 481 | alarm(2); |
472 | $result = NPTest->testCmd( $cmd ); | 482 | $result = NPTest->testCmd( $cmd ); |
473 | alarm(0); }; | 483 | }; |
484 | alarm(0); | ||
474 | isnt( $@, "alarm\n", $cmd ); | 485 | isnt( $@, "alarm\n", $cmd ); |
475 | is( $result->return_code, 0, $cmd ); | 486 | is( $result->return_code, 0, $cmd ); |
476 | 487 | ||
@@ -480,7 +491,8 @@ sub run_common_tests { | |||
480 | local $SIG{ALRM} = sub { die "alarm\n" }; | 491 | local $SIG{ALRM} = sub { die "alarm\n" }; |
481 | alarm(2); | 492 | alarm(2); |
482 | $result = NPTest->testCmd( $cmd ); | 493 | $result = NPTest->testCmd( $cmd ); |
483 | alarm(0); }; | 494 | }; |
495 | alarm(0); | ||
484 | isnt( $@, "alarm\n", $cmd ); | 496 | isnt( $@, "alarm\n", $cmd ); |
485 | isnt( $result->return_code, 0, $cmd ); | 497 | isnt( $result->return_code, 0, $cmd ); |
486 | 498 | ||
@@ -506,4 +518,9 @@ sub run_common_tests { | |||
506 | }; | 518 | }; |
507 | is( $@, "", $cmd ); | 519 | is( $@, "", $cmd ); |
508 | 520 | ||
521 | $cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'"; | ||
522 | eval { | ||
523 | $result = NPTest->testCmd( $cmd, 5 ); | ||
524 | }; | ||
525 | is( $@, "", $cmd ); | ||
509 | } | 526 | } |
diff --git a/plugins/tests/check_http.t b/plugins/tests/check_http.t index 188f5e7..6078b27 100755 --- a/plugins/tests/check_http.t +++ b/plugins/tests/check_http.t | |||
@@ -3,27 +3,20 @@ | |||
3 | # Test check_http by having an actual HTTP server running | 3 | # Test check_http by having an actual HTTP server running |
4 | # | 4 | # |
5 | # To create the https server certificate: | 5 | # To create the https server certificate: |
6 | # openssl req -new -x509 -keyout server-key.pem -out server-cert.pem -days 3650 -nodes | 6 | # ./certs/generate-certs.sh |
7 | # to create a new expired certificate: | ||
8 | # faketime '2008-01-01 12:00:00' openssl req -new -x509 -keyout expired-key.pem -out expired-cert.pem -days 1 -nodes | ||
9 | # Country Name (2 letter code) [AU]:DE | ||
10 | # State or Province Name (full name) [Some-State]:Bavaria | ||
11 | # Locality Name (eg, city) []:Munich | ||
12 | # Organization Name (eg, company) [Internet Widgits Pty Ltd]:Monitoring Plugins | ||
13 | # Organizational Unit Name (eg, section) []: | ||
14 | # Common Name (e.g. server FQDN or YOUR name) []:Monitoring Plugins | ||
15 | # Email Address []:devel@monitoring-plugins.org | ||
16 | 7 | ||
17 | use strict; | 8 | use strict; |
18 | use Test::More; | 9 | use Test::More; |
19 | use NPTest; | 10 | use NPTest; |
20 | use FindBin qw($Bin); | 11 | use FindBin qw($Bin); |
12 | use IO::Socket::INET; | ||
21 | 13 | ||
22 | $ENV{'LC_TIME'} = "C"; | 14 | $ENV{'LC_TIME'} = "C"; |
23 | 15 | ||
24 | my $common_tests = 70; | 16 | my $common_tests = 71; |
25 | my $virtual_port_tests = 8; | 17 | my $virtual_port_tests = 8; |
26 | my $ssl_only_tests = 8; | 18 | my $ssl_only_tests = 12; |
19 | my $chunked_encoding_special_tests = 1; | ||
27 | # Check that all dependent modules are available | 20 | # Check that all dependent modules are available |
28 | eval "use HTTP::Daemon 6.01;"; | 21 | eval "use HTTP::Daemon 6.01;"; |
29 | plan skip_all => 'HTTP::Daemon >= 6.01 required' if $@; | 22 | plan skip_all => 'HTTP::Daemon >= 6.01 required' if $@; |
@@ -39,7 +32,7 @@ if ($@) { | |||
39 | plan skip_all => "Missing required module for test: $@"; | 32 | plan skip_all => "Missing required module for test: $@"; |
40 | } else { | 33 | } else { |
41 | if (-x "./$plugin") { | 34 | if (-x "./$plugin") { |
42 | plan tests => $common_tests * 2 + $ssl_only_tests + $virtual_port_tests; | 35 | plan tests => $common_tests * 2 + $ssl_only_tests + $virtual_port_tests + $chunked_encoding_special_tests; |
43 | } else { | 36 | } else { |
44 | plan skip_all => "No $plugin compiled"; | 37 | plan skip_all => "No $plugin compiled"; |
45 | } | 38 | } |
@@ -59,61 +52,110 @@ $HTTP::Daemon::VERSION = "1.00"; | |||
59 | my $port_http = 50000 + int(rand(1000)); | 52 | my $port_http = 50000 + int(rand(1000)); |
60 | my $port_https = $port_http + 1; | 53 | my $port_https = $port_http + 1; |
61 | my $port_https_expired = $port_http + 2; | 54 | my $port_https_expired = $port_http + 2; |
55 | my $port_https_clientcert = $port_http + 3; | ||
56 | my $port_hacked_http = $port_http + 4; | ||
62 | 57 | ||
63 | # This array keeps sockets around for implementing timeouts | 58 | # This array keeps sockets around for implementing timeouts |
64 | my @persist; | 59 | my @persist; |
65 | 60 | ||
66 | # Start up all servers | 61 | # Start up all servers |
67 | my @pids; | 62 | my @pids; |
68 | my $pid = fork(); | 63 | # Fork a HTTP server |
69 | if ($pid) { | 64 | my $pid = fork; |
70 | # Parent | 65 | defined $pid or die "Failed to fork"; |
71 | push @pids, $pid; | 66 | if (!$pid) { |
72 | if (exists $servers->{https}) { | 67 | undef @pids; |
73 | # Fork a normal HTTPS server | ||
74 | $pid = fork(); | ||
75 | if ($pid) { | ||
76 | # Parent | ||
77 | push @pids, $pid; | ||
78 | # Fork an expired cert server | ||
79 | $pid = fork(); | ||
80 | if ($pid) { | ||
81 | push @pids, $pid; | ||
82 | } else { | ||
83 | my $d = HTTP::Daemon::SSL->new( | ||
84 | LocalPort => $port_https_expired, | ||
85 | LocalAddr => "127.0.0.1", | ||
86 | SSL_cert_file => "$Bin/certs/expired-cert.pem", | ||
87 | SSL_key_file => "$Bin/certs/expired-key.pem", | ||
88 | ) || die; | ||
89 | print "Please contact https expired at: <URL:", $d->url, ">\n"; | ||
90 | run_server( $d ); | ||
91 | exit; | ||
92 | } | ||
93 | } else { | ||
94 | # closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise | ||
95 | local $SIG{'PIPE'} = 'IGNORE'; | ||
96 | my $d = HTTP::Daemon::SSL->new( | ||
97 | LocalPort => $port_https, | ||
98 | LocalAddr => "127.0.0.1", | ||
99 | SSL_cert_file => "$Bin/certs/server-cert.pem", | ||
100 | SSL_key_file => "$Bin/certs/server-key.pem", | ||
101 | ) || die; | ||
102 | print "Please contact https at: <URL:", $d->url, ">\n"; | ||
103 | run_server( $d ); | ||
104 | exit; | ||
105 | } | ||
106 | } | ||
107 | } else { | ||
108 | # Child | ||
109 | #print "child\n"; | ||
110 | my $d = HTTP::Daemon->new( | 68 | my $d = HTTP::Daemon->new( |
111 | LocalPort => $port_http, | 69 | LocalPort => $port_http, |
112 | LocalAddr => "127.0.0.1", | 70 | LocalAddr => "127.0.0.1", |
113 | ) || die; | 71 | ) || die; |
114 | print "Please contact http at: <URL:", $d->url, ">\n"; | 72 | print "Please contact http at: <URL:", $d->url, ">\n"; |
115 | run_server( $d ); | 73 | run_server( $d ); |
116 | exit; | 74 | die "webserver stopped"; |
75 | } | ||
76 | push @pids, $pid; | ||
77 | |||
78 | # Fork the hacked HTTP server | ||
79 | undef $pid; | ||
80 | $pid = fork; | ||
81 | defined $pid or die "Failed to fork"; | ||
82 | if (!$pid) { | ||
83 | # this is the fork | ||
84 | undef @pids; | ||
85 | my $socket = new IO::Socket::INET ( | ||
86 | LocalHost => '0.0.0.0', | ||
87 | LocalPort => $port_hacked_http, | ||
88 | Proto => 'tcp', | ||
89 | Listen => 5, | ||
90 | Reuse => 1 | ||
91 | ); | ||
92 | die "cannot create socket $!n" unless $socket; | ||
93 | my $local_sock = $socket->sockport(); | ||
94 | print "server waiting for client connection on port $local_sock\n"; | ||
95 | run_hacked_http_server ( $socket ); | ||
96 | die "hacked http server stopped"; | ||
97 | } | ||
98 | push @pids, $pid; | ||
99 | |||
100 | if (exists $servers->{https}) { | ||
101 | # Fork a normal HTTPS server | ||
102 | $pid = fork; | ||
103 | defined $pid or die "Failed to fork"; | ||
104 | if (!$pid) { | ||
105 | undef @pids; | ||
106 | # closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise | ||
107 | local $SIG{'PIPE'} = 'IGNORE'; | ||
108 | my $d = HTTP::Daemon::SSL->new( | ||
109 | LocalPort => $port_https, | ||
110 | LocalAddr => "127.0.0.1", | ||
111 | SSL_cert_file => "$Bin/certs/server-cert.pem", | ||
112 | SSL_key_file => "$Bin/certs/server-key.pem", | ||
113 | ) || die; | ||
114 | print "Please contact https at: <URL:", $d->url, ">\n"; | ||
115 | run_server( $d ); | ||
116 | die "webserver stopped"; | ||
117 | } | ||
118 | push @pids, $pid; | ||
119 | |||
120 | # Fork an expired cert server | ||
121 | $pid = fork; | ||
122 | defined $pid or die "Failed to fork"; | ||
123 | if (!$pid) { | ||
124 | undef @pids; | ||
125 | # closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise | ||
126 | local $SIG{'PIPE'} = 'IGNORE'; | ||
127 | my $d = HTTP::Daemon::SSL->new( | ||
128 | LocalPort => $port_https_expired, | ||
129 | LocalAddr => "127.0.0.1", | ||
130 | SSL_cert_file => "$Bin/certs/expired-cert.pem", | ||
131 | SSL_key_file => "$Bin/certs/expired-key.pem", | ||
132 | ) || die; | ||
133 | print "Please contact https expired at: <URL:", $d->url, ">\n"; | ||
134 | run_server( $d ); | ||
135 | die "webserver stopped"; | ||
136 | } | ||
137 | push @pids, $pid; | ||
138 | |||
139 | # Fork an client cert expecting server | ||
140 | $pid = fork; | ||
141 | defined $pid or die "Failed to fork"; | ||
142 | if (!$pid) { | ||
143 | undef @pids; | ||
144 | # closing the connection after -C cert checks make the daemon exit with a sigpipe otherwise | ||
145 | local $SIG{'PIPE'} = 'IGNORE'; | ||
146 | my $d = HTTP::Daemon::SSL->new( | ||
147 | LocalPort => $port_https_clientcert, | ||
148 | LocalAddr => "127.0.0.1", | ||
149 | SSL_cert_file => "$Bin/certs/server-cert.pem", | ||
150 | SSL_key_file => "$Bin/certs/server-key.pem", | ||
151 | SSL_verify_mode => IO::Socket::SSL->SSL_VERIFY_PEER | IO::Socket::SSL->SSL_VERIFY_FAIL_IF_NO_PEER_CERT, | ||
152 | SSL_ca_file => "$Bin/certs/clientca-cert.pem", | ||
153 | ) || die; | ||
154 | print "Please contact https client cert at: <URL:", $d->url, ">\n"; | ||
155 | run_server( $d ); | ||
156 | die "webserver stopped"; | ||
157 | } | ||
158 | push @pids, $pid; | ||
117 | } | 159 | } |
118 | 160 | ||
119 | # give our webservers some time to startup | 161 | # give our webservers some time to startup |
@@ -122,64 +164,105 @@ sleep(3); | |||
122 | # Run the same server on http and https | 164 | # Run the same server on http and https |
123 | sub run_server { | 165 | sub run_server { |
124 | my $d = shift; | 166 | my $d = shift; |
125 | MAINLOOP: while (my $c = $d->accept ) { | 167 | while (1) { |
126 | while (my $r = $c->get_request) { | 168 | MAINLOOP: while (my $c = $d->accept) { |
127 | if ($r->method eq "GET" and $r->url->path =~ m^/statuscode/(\d+)^) { | 169 | while (my $r = $c->get_request) { |
128 | $c->send_basic_header($1); | 170 | if ($r->method eq "GET" and $r->url->path =~ m^/statuscode/(\d+)^) { |
129 | $c->send_crlf; | 171 | $c->send_basic_header($1); |
130 | } elsif ($r->method eq "GET" and $r->url->path =~ m^/file/(.*)^) { | 172 | $c->send_crlf; |
131 | $c->send_basic_header; | 173 | } elsif ($r->method eq "GET" and $r->url->path =~ m^/file/(.*)^) { |
132 | $c->send_crlf; | 174 | $c->send_basic_header; |
133 | $c->send_file_response("$Bin/var/$1"); | 175 | $c->send_crlf; |
134 | } elsif ($r->method eq "GET" and $r->url->path eq "/slow") { | 176 | $c->send_file_response("$Bin/var/$1"); |
135 | $c->send_basic_header; | 177 | } elsif ($r->method eq "GET" and $r->url->path eq "/slow") { |
136 | $c->send_crlf; | 178 | $c->send_basic_header; |
137 | sleep 1; | 179 | $c->send_crlf; |
138 | $c->send_response("slow"); | 180 | sleep 1; |
139 | } elsif ($r->url->path eq "/method") { | 181 | $c->send_response("slow"); |
140 | if ($r->method eq "DELETE") { | 182 | } elsif ($r->url->path eq "/method") { |
141 | $c->send_error(HTTP::Status->RC_METHOD_NOT_ALLOWED); | 183 | if ($r->method eq "DELETE") { |
142 | } elsif ($r->method eq "foo") { | 184 | $c->send_error(HTTP::Status->RC_METHOD_NOT_ALLOWED); |
143 | $c->send_error(HTTP::Status->RC_NOT_IMPLEMENTED); | 185 | } elsif ($r->method eq "foo") { |
186 | $c->send_error(HTTP::Status->RC_NOT_IMPLEMENTED); | ||
187 | } else { | ||
188 | $c->send_status_line(200, $r->method); | ||
189 | } | ||
190 | } elsif ($r->url->path eq "/postdata") { | ||
191 | $c->send_basic_header; | ||
192 | $c->send_crlf; | ||
193 | $c->send_response($r->method.":".$r->content); | ||
194 | } elsif ($r->url->path eq "/redirect") { | ||
195 | $c->send_redirect( "/redirect2" ); | ||
196 | } elsif ($r->url->path eq "/redir_external") { | ||
197 | $c->send_redirect(($d->isa('HTTP::Daemon::SSL') ? "https" : "http") . "://169.254.169.254/redirect2" ); | ||
198 | } elsif ($r->url->path eq "/redirect2") { | ||
199 | $c->send_basic_header; | ||
200 | $c->send_crlf; | ||
201 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' )); | ||
202 | } elsif ($r->url->path eq "/redir_timeout") { | ||
203 | $c->send_redirect( "/timeout" ); | ||
204 | } elsif ($r->url->path eq "/timeout") { | ||
205 | # Keep $c from being destroyed, but prevent severe leaks | ||
206 | unshift @persist, $c; | ||
207 | delete($persist[1000]); | ||
208 | next MAINLOOP; | ||
209 | } elsif ($r->url->path eq "/header_check") { | ||
210 | $c->send_basic_header; | ||
211 | $c->send_header('foo'); | ||
212 | $c->send_crlf; | ||
213 | } elsif ($r->url->path eq "/virtual_port") { | ||
214 | # return sent Host header | ||
215 | $c->send_basic_header; | ||
216 | $c->send_crlf; | ||
217 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host'))); | ||
218 | } elsif ($r->url->path eq "/chunked") { | ||
219 | my $chunks = ["chunked", "encoding", "test\n"]; | ||
220 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, sub { | ||
221 | my $chunk = shift @{$chunks}; | ||
222 | return unless $chunk; | ||
223 | sleep(1); | ||
224 | return($chunk); | ||
225 | })); | ||
144 | } else { | 226 | } else { |
145 | $c->send_status_line(200, $r->method); | 227 | $c->send_error(HTTP::Status->RC_FORBIDDEN); |
146 | } | 228 | } |
147 | } elsif ($r->url->path eq "/postdata") { | 229 | $c->close; |
148 | $c->send_basic_header; | ||
149 | $c->send_crlf; | ||
150 | $c->send_response($r->method.":".$r->content); | ||
151 | } elsif ($r->url->path eq "/redirect") { | ||
152 | $c->send_redirect( "/redirect2" ); | ||
153 | } elsif ($r->url->path eq "/redir_external") { | ||
154 | $c->send_redirect(($d->isa('HTTP::Daemon::SSL') ? "https" : "http") . "://169.254.169.254/redirect2" ); | ||
155 | } elsif ($r->url->path eq "/redirect2") { | ||
156 | $c->send_basic_header; | ||
157 | $c->send_crlf; | ||
158 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, 'redirected' )); | ||
159 | } elsif ($r->url->path eq "/redir_timeout") { | ||
160 | $c->send_redirect( "/timeout" ); | ||
161 | } elsif ($r->url->path eq "/timeout") { | ||
162 | # Keep $c from being destroyed, but prevent severe leaks | ||
163 | unshift @persist, $c; | ||
164 | delete($persist[1000]); | ||
165 | next MAINLOOP; | ||
166 | } elsif ($r->url->path eq "/header_check") { | ||
167 | $c->send_basic_header; | ||
168 | $c->send_header('foo'); | ||
169 | $c->send_crlf; | ||
170 | } elsif ($r->url->path eq "/virtual_port") { | ||
171 | # return sent Host header | ||
172 | $c->send_basic_header; | ||
173 | $c->send_crlf; | ||
174 | $c->send_response(HTTP::Response->new( 200, 'OK', undef, $r->header ('Host'))); | ||
175 | } else { | ||
176 | $c->send_error(HTTP::Status->RC_FORBIDDEN); | ||
177 | } | 230 | } |
178 | $c->close; | ||
179 | } | 231 | } |
180 | } | 232 | } |
181 | } | 233 | } |
182 | 234 | ||
235 | sub run_hacked_http_server { | ||
236 | my $socket = shift; | ||
237 | |||
238 | # auto-flush on socket | ||
239 | $| = 1; | ||
240 | |||
241 | |||
242 | while(1) | ||
243 | { | ||
244 | # waiting for a new client connection | ||
245 | my $client_socket = $socket->accept(); | ||
246 | |||
247 | # get information about a newly connected client | ||
248 | my $client_address = $client_socket->peerhost(); | ||
249 | my $client_portn = $client_socket->peerport(); | ||
250 | print "connection from $client_address:$client_portn"; | ||
251 | |||
252 | # read up to 1024 characters from the connected client | ||
253 | my $data = ""; | ||
254 | $client_socket->recv($data, 1024); | ||
255 | print "received data: $data"; | ||
256 | |||
257 | # write response data to the connected client | ||
258 | $data = "HTTP/1.1 200 OK\r\nTransfer-Encoding: chunked\r\n\r\n0\r\n\r\n"; | ||
259 | $client_socket->send($data); | ||
260 | |||
261 | # notify client that response has been sent | ||
262 | shutdown($client_socket, 1); | ||
263 | } | ||
264 | } | ||
265 | |||
183 | END { | 266 | END { |
184 | foreach my $pid (@pids) { | 267 | foreach my $pid (@pids) { |
185 | if ($pid) { print "Killing $pid\n"; kill "INT", $pid } | 268 | if ($pid) { print "Killing $pid\n"; kill "INT", $pid } |
@@ -195,30 +278,50 @@ if ($ARGV[0] && $ARGV[0] eq "-d") { | |||
195 | my $result; | 278 | my $result; |
196 | my $command = "./$plugin -H 127.0.0.1"; | 279 | my $command = "./$plugin -H 127.0.0.1"; |
197 | 280 | ||
281 | run_chunked_encoding_special_test( {command => "$command -p $port_hacked_http"}); | ||
198 | run_common_tests( { command => "$command -p $port_http" } ); | 282 | run_common_tests( { command => "$command -p $port_http" } ); |
199 | SKIP: { | 283 | SKIP: { |
200 | skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https}; | 284 | skip "HTTP::Daemon::SSL not installed", $common_tests + $ssl_only_tests if ! exists $servers->{https}; |
201 | run_common_tests( { command => "$command -p $port_https", ssl => 1 } ); | 285 | run_common_tests( { command => "$command -p $port_https", ssl => 1 } ); |
202 | 286 | ||
287 | my $expiry = "Thu Nov 28 21:02:11 2030 +0000"; | ||
288 | |||
203 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); | 289 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14" ); |
204 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); | 290 | is( $result->return_code, 0, "$command -p $port_https -S -C 14" ); |
205 | is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on Fri Feb 16 15:31:44 2029 +0000.", "output ok" ); | 291 | is( $result->output, "OK - Certificate 'Monitoring Plugins' will expire on $expiry.", "output ok" ); |
206 | 292 | ||
207 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); | 293 | $result = NPTest->testCmd( "$command -p $port_https -S -C 14000" ); |
208 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); | 294 | is( $result->return_code, 1, "$command -p $port_https -S -C 14000" ); |
209 | like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" ); | 295 | like( $result->output, '/WARNING - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" ); |
210 | 296 | ||
211 | # Expired cert tests | 297 | # Expired cert tests |
212 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); | 298 | $result = NPTest->testCmd( "$command -p $port_https -S -C 13960,14000" ); |
213 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); | 299 | is( $result->return_code, 2, "$command -p $port_https -S -C 13960,14000" ); |
214 | like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(Fri Feb 16 15:31:44 2029 \+0000\)./', "output ok" ); | 300 | like( $result->output, '/CRITICAL - Certificate \'Monitoring Plugins\' expires in \d+ day\(s\) \(' . quotemeta($expiry) . '\)./', "output ok" ); |
215 | 301 | ||
216 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); | 302 | $result = NPTest->testCmd( "$command -p $port_https_expired -S -C 7" ); |
217 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); | 303 | is( $result->return_code, 2, "$command -p $port_https_expired -S -C 7" ); |
218 | is( $result->output, | 304 | is( $result->output, |
219 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 11:00:26 2008 +0000.', | 305 | 'CRITICAL - Certificate \'Monitoring Plugins\' expired on Wed Jan 2 12:00:00 2008 +0000.', |
220 | "output ok" ); | 306 | "output ok" ); |
221 | 307 | ||
308 | # client cert tests | ||
309 | my $cmd; | ||
310 | $cmd = "$command -p $port_https_clientcert" | ||
311 | . " -J \"$Bin/certs/client-cert.pem\"" | ||
312 | . " -K \"$Bin/certs/client-key.pem\"" | ||
313 | . " -u /statuscode/200"; | ||
314 | $result = NPTest->testCmd($cmd); | ||
315 | is( $result->return_code, 0, $cmd); | ||
316 | like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); | ||
317 | |||
318 | $cmd = "$command -p $port_https_clientcert" | ||
319 | . " -J \"$Bin/certs/clientchain-cert.pem\"" | ||
320 | . " -K \"$Bin/certs/clientchain-key.pem\"" | ||
321 | . " -u /statuscode/200"; | ||
322 | $result = NPTest->testCmd($cmd); | ||
323 | is( $result->return_code, 0, $cmd); | ||
324 | like( $result->output, '/^HTTP OK: HTTP/1.1 200 OK - \d+ bytes in [\d\.]+ second/', "Output correct: ".$result->output ); | ||
222 | } | 325 | } |
223 | 326 | ||
224 | my $cmd; | 327 | my $cmd; |
@@ -459,4 +562,20 @@ sub run_common_tests { | |||
459 | }; | 562 | }; |
460 | is( $@, "", $cmd ); | 563 | is( $@, "", $cmd ); |
461 | 564 | ||
565 | $cmd = "$command -u /chunked -s 'chunkedencodingtest' -d 'Transfer-Encoding: chunked'"; | ||
566 | eval { | ||
567 | $result = NPTest->testCmd( $cmd, 5 ); | ||
568 | }; | ||
569 | is( $@, "", $cmd ); | ||
570 | } | ||
571 | |||
572 | sub run_chunked_encoding_special_test { | ||
573 | my ($opts) = @_; | ||
574 | my $command = $opts->{command}; | ||
575 | |||
576 | $cmd = "$command -u / -s 'ChunkedEncodingSpecialTest'"; | ||
577 | eval { | ||
578 | $result = NPTest->testCmd( $cmd, 5 ); | ||
579 | }; | ||
580 | is( $@, "", $cmd ); | ||
462 | } | 581 | } |
diff --git a/plugins/tests/check_procs.t b/plugins/tests/check_procs.t index 54d43d9..b3a0a30 100755 --- a/plugins/tests/check_procs.t +++ b/plugins/tests/check_procs.t | |||
@@ -8,13 +8,14 @@ use Test::More; | |||
8 | use NPTest; | 8 | use NPTest; |
9 | 9 | ||
10 | if (-x "./check_procs") { | 10 | if (-x "./check_procs") { |
11 | plan tests => 50; | 11 | plan tests => 54; |
12 | } else { | 12 | } else { |
13 | plan skip_all => "No check_procs compiled"; | 13 | plan skip_all => "No check_procs compiled"; |
14 | } | 14 | } |
15 | 15 | ||
16 | my $result; | 16 | my $result; |
17 | my $command = "./check_procs --input-file=tests/var/ps-axwo.darwin"; | 17 | my $command = "./check_procs --input-file=tests/var/ps-axwo.darwin"; |
18 | my $cmd_etime = "./check_procs --input-file=tests/var/ps-axwo.debian"; | ||
18 | 19 | ||
19 | $result = NPTest->testCmd( "$command" ); | 20 | $result = NPTest->testCmd( "$command" ); |
20 | is( $result->return_code, 0, "Run with no options" ); | 21 | is( $result->return_code, 0, "Run with no options" ); |
@@ -33,9 +34,13 @@ is( $result->return_code, 0, "Checking no threshold breeched" ); | |||
33 | is( $result->output, "PROCS OK: 95 processes | procs=95;100;200;0;", "Output correct" ); | 34 | is( $result->output, "PROCS OK: 95 processes | procs=95;100;200;0;", "Output correct" ); |
34 | 35 | ||
35 | $result = NPTest->testCmd( "$command -C launchd -c 5" ); | 36 | $result = NPTest->testCmd( "$command -C launchd -c 5" ); |
36 | is( $result->return_code, 2, "Checking processes filtered by command name" ); | 37 | is( $result->return_code, 2, "Checking processes matched by command name" ); |
37 | is( $result->output, "PROCS CRITICAL: 6 processes with command name 'launchd' | procs=6;;5;0;", "Output correct" ); | 38 | is( $result->output, "PROCS CRITICAL: 6 processes with command name 'launchd' | procs=6;;5;0;", "Output correct" ); |
38 | 39 | ||
40 | $result = NPTest->testCmd( "$command -X bash -c 5" ); | ||
41 | is( $result->return_code, 2, "Checking processes excluded by command name" ); | ||
42 | is( $result->output, "PROCS CRITICAL: 95 processes with exclude progs 'bash' | procs=95;;5;0;", "Output correct" ); | ||
43 | |||
39 | SKIP: { | 44 | SKIP: { |
40 | skip 'user with uid 501 required', 4 unless getpwuid(501); | 45 | skip 'user with uid 501 required', 4 unless getpwuid(501); |
41 | 46 | ||
@@ -69,9 +74,21 @@ SKIP: { | |||
69 | like( $result->output, '/^PROCS OK: 0 processes with UID = -2 \(nobody\), args \'UsB\'/', "Output correct" ); | 74 | like( $result->output, '/^PROCS OK: 0 processes with UID = -2 \(nobody\), args \'UsB\'/', "Output correct" ); |
70 | }; | 75 | }; |
71 | 76 | ||
72 | $result = NPTest->testCmd( "$command --ereg-argument-array='mdworker.*501'" ); | 77 | SKIP: { |
73 | is( $result->return_code, 0, "Checking regexp search of arguments" ); | 78 | skip 'check_procs is compiled with etime format support', 2 if `$command -vvv` =~ m/etime/mx; |
74 | is( $result->output, "PROCS OK: 1 process with regex args 'mdworker.*501' | procs=1;;;0;", "Output correct" ); | 79 | |
80 | $result = NPTest->testCmd( "$command --ereg-argument-array='mdworker.*501'" ); | ||
81 | is( $result->return_code, 0, "Checking regexp search of arguments" ); | ||
82 | is( $result->output, "PROCS OK: 1 process with regex args 'mdworker.*501' | procs=1;;;0;", "Output correct" ); | ||
83 | } | ||
84 | |||
85 | SKIP: { | ||
86 | skip 'check_procs is compiled without etime format support', 2 if `$cmd_etime -vvv` !~ m/etime/mx; | ||
87 | |||
88 | $result = NPTest->testCmd( "$cmd_etime -m ELAPSED -C apache2 -w 1000 -c 2000" ); | ||
89 | is( $result->return_code, 2, "Checking elapsed time threshold" ); | ||
90 | is( $result->output, "ELAPSED CRITICAL: 10 crit, 0 warn out of 10 processes with command name 'apache2' | procs=10;;;0; procs_warn=0;;;0; procs_crit=10;;;0;", "Output correct" ); | ||
91 | } | ||
75 | 92 | ||
76 | $result = NPTest->testCmd( "$command --vsz 1000000" ); | 93 | $result = NPTest->testCmd( "$command --vsz 1000000" ); |
77 | is( $result->return_code, 0, "Checking filter by VSZ" ); | 94 | is( $result->return_code, 0, "Checking filter by VSZ" ); |
@@ -83,7 +100,7 @@ is( $result->output, 'PROCS OK: 3 processes with RSS >= 100000 | procs=3;;;0;', | |||
83 | 100 | ||
84 | $result = NPTest->testCmd( "$command -s S" ); | 101 | $result = NPTest->testCmd( "$command -s S" ); |
85 | is( $result->return_code, 0, "Checking filter for sleeping processes" ); | 102 | is( $result->return_code, 0, "Checking filter for sleeping processes" ); |
86 | like( $result->output, '/^PROCS OK: 44 processes with STATE = S/', "Output correct" ); | 103 | like( $result->output, '/^PROCS OK: 88 processes with STATE = S/', "Output correct" ); |
87 | 104 | ||
88 | $result = NPTest->testCmd( "$command -s Z" ); | 105 | $result = NPTest->testCmd( "$command -s Z" ); |
89 | is( $result->return_code, 0, "Checking filter for zombies" ); | 106 | is( $result->return_code, 0, "Checking filter for zombies" ); |
@@ -129,4 +146,3 @@ is( $result->output, 'RSS CRITICAL: 5 crit, 0 warn out of 95 processes [WindowSe | |||
129 | $result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" ); | 146 | $result = NPTest->testCmd( "$command --ereg-argument-array='(nosuchname|nosuch2name)'" ); |
130 | is( $result->return_code, 0, "Checking no pipe symbol in output" ); | 147 | is( $result->return_code, 0, "Checking no pipe symbol in output" ); |
131 | is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)' | procs=0;;;0;", "Output correct" ); | 148 | is( $result->output, "PROCS OK: 0 processes with regex args '(nosuchname,nosuch2name)' | procs=0;;;0;", "Output correct" ); |
132 | |||
diff --git a/plugins/tests/check_snmp.t b/plugins/tests/check_snmp.t index 85d6bf5..bfe42e1 100755 --- a/plugins/tests/check_snmp.t +++ b/plugins/tests/check_snmp.t | |||
@@ -9,7 +9,7 @@ use NPTest; | |||
9 | use FindBin qw($Bin); | 9 | use FindBin qw($Bin); |
10 | use POSIX qw/strftime/; | 10 | use POSIX qw/strftime/; |
11 | 11 | ||
12 | my $tests = 67; | 12 | my $tests = 81; |
13 | # Check that all dependent modules are available | 13 | # Check that all dependent modules are available |
14 | eval { | 14 | eval { |
15 | require NetSNMP::OID; | 15 | require NetSNMP::OID; |
@@ -53,13 +53,13 @@ if ($pid) { | |||
53 | #print "child\n"; | 53 | #print "child\n"; |
54 | 54 | ||
55 | print "Please contact SNMP at: $port_snmp\n"; | 55 | print "Please contact SNMP at: $port_snmp\n"; |
56 | close(STDERR); # Coment out to debug snmpd problems (most errors sent there are OK) | 56 | close(STDERR); # Comment out to debug snmpd problems (most errors sent there are OK) |
57 | exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp"); | 57 | exec("snmpd -c tests/conf/snmpd.conf -C -f -r udp:$port_snmp"); |
58 | } | 58 | } |
59 | 59 | ||
60 | END { | 60 | END { |
61 | foreach my $pid (@pids) { | 61 | foreach my $pid (@pids) { |
62 | if ($pid) { print "Killing $pid\n"; kill "INT", $pid } | 62 | if ($pid) { print "Killing $pid\n"; kill "INT", $pid } |
63 | } | 63 | } |
64 | }; | 64 | }; |
65 | 65 | ||
@@ -227,7 +227,7 @@ is($res->output, 'SNMP OK - "555\"I said\"" | ', "Check string with a double quo | |||
227 | 227 | ||
228 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.15 -r 'CUSTOM CHECK OK'" ); | 228 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.15 -r 'CUSTOM CHECK OK'" ); |
229 | is($res->return_code, 0, "String check should check whole string, not a parsed number" ); | 229 | is($res->return_code, 0, "String check should check whole string, not a parsed number" ); |
230 | is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check witn numbers returns whole string"); | 230 | is($res->output, 'SNMP OK - "CUSTOM CHECK OK: foo is 12345" | ', "String check with numbers returns whole string"); |
231 | 231 | ||
232 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.16 -w -2: -c -3:" ); | 232 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.16 -w -2: -c -3:" ); |
233 | is($res->return_code, 0, "Negative integer check OK" ); | 233 | is($res->return_code, 0, "Negative integer check OK" ); |
@@ -251,9 +251,36 @@ is($res->output, 'SNMP CRITICAL - *-4* | iso.3.6.1.4.1.8072.3.2.67.17=-4;-2:;-3: | |||
251 | 251 | ||
252 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -c '~:-6.5'" ); | 252 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -c '~:-6.5'" ); |
253 | is($res->return_code, 0, "Negative float OK" ); | 253 | is($res->return_code, 0, "Negative float OK" ); |
254 | is($res->output, 'SNMP OK - -6.6 | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;;~:-6.5 ', "Negative float OK output" ); | 254 | is($res->output, 'SNMP OK - -6.6 | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;;@-6.5:~ ', "Negative float OK output" ); |
255 | 255 | ||
256 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -w '~:-6.65' -c '~:-6.55'" ); | 256 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.18 -w '~:-6.65' -c '~:-6.55'" ); |
257 | is($res->return_code, 1, "Negative float WARNING" ); | 257 | is($res->return_code, 1, "Negative float WARNING" ); |
258 | is($res->output, 'SNMP WARNING - *-6.6* | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;~:-6.65;~:-6.55 ', "Negative float WARNING output" ); | 258 | is($res->output, 'SNMP WARNING - *-6.6* | iso.3.6.1.4.1.8072.3.2.67.18=-6.6;@-6.65:~;@-6.55:~ ', "Negative float WARNING output" ); |
259 | 259 | ||
260 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w '1:100000,-10:20' -c '2:200000,-20:30'" ); | ||
261 | is($res->return_code, 0, "Multiple OIDs with thresholds" ); | ||
262 | like($res->output, '/SNMP OK - \d+ -4 | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1:100000;2:200000 iso.3.6.1.4.1.8072.3.2.67.17=-4;-10:20;-20:30/', "Multiple OIDs with thresholds output" ); | ||
263 | |||
264 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w '1:100000,-1:2' -c '2:200000,-20:30'" ); | ||
265 | is($res->return_code, 1, "Multiple OIDs with thresholds" ); | ||
266 | like($res->output, '/SNMP WARNING - \d+ \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1:100000;2:200000 iso.3.6.1.4.1.8072.3.2.67.17=-4;-10:20;-20:30/', "Multiple OIDs with thresholds output" ); | ||
267 | |||
268 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.10,.1.3.6.1.4.1.8072.3.2.67.17 -w 1,2 -c 1" ); | ||
269 | is($res->return_code, 2, "Multiple OIDs with some thresholds" ); | ||
270 | like($res->output, '/SNMP CRITICAL - \*\d+\* \*-4\* | iso.3.6.1.4.1.8072.3.2.67.10=\d+c;1;2 iso.3.6.1.4.1.8072.3.2.67.17=-4;;/', "Multiple OIDs with thresholds output" ); | ||
271 | |||
272 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19"); | ||
273 | is($res->return_code, 0, "Test plain .1.3.6.1.4.1.8072.3.2.67.6 RC" ); | ||
274 | is($res->output,'SNMP OK - 42 | iso.3.6.1.4.1.8072.3.2.67.19=42 ', "Test plain value of .1.3.6.1.4.1.8072.3.2.67.1" ); | ||
275 | |||
276 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 -M .1"); | ||
277 | is($res->return_code, 0, "Test multiply RC" ); | ||
278 | is($res->output,'SNMP OK - 4.200000 | iso.3.6.1.4.1.8072.3.2.67.19=4.200000 ' , "Test multiply .1 output" ); | ||
279 | |||
280 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 --multiplier=.1 -f '%.2f' "); | ||
281 | is($res->return_code, 0, "Test multiply RC + format" ); | ||
282 | is($res->output, 'SNMP OK - 4.20 | iso.3.6.1.4.1.8072.3.2.67.19=4.20 ', "Test multiply .1 output + format" ); | ||
283 | |||
284 | $res = NPTest->testCmd( "./check_snmp -H 127.0.0.1 -C public -p $port_snmp -o .1.3.6.1.4.1.8072.3.2.67.19 --multiplier=.1 -f '%.2f' -w 1"); | ||
285 | is($res->return_code, 1, "Test multiply RC + format + thresholds" ); | ||
286 | is($res->output, 'SNMP WARNING - *4.20* | iso.3.6.1.4.1.8072.3.2.67.19=4.20;1 ', "Test multiply .1 output + format + thresholds" ); | ||
diff --git a/plugins/tests/check_snmp_agent.pl b/plugins/tests/check_snmp_agent.pl index 0e41d57..38912e9 100644 --- a/plugins/tests/check_snmp_agent.pl +++ b/plugins/tests/check_snmp_agent.pl | |||
@@ -32,11 +32,11 @@ my $multilin5 = 'And now have fun with with this: "C:\\" | |||
32 | because we\'re not done yet!'; | 32 | because we\'re not done yet!'; |
33 | 33 | ||
34 | # Next are arrays of indexes (Type, initial value and increments) | 34 | # Next are arrays of indexes (Type, initial value and increments) |
35 | # 0..16 <---- please update comment when adding/removing fields | 35 | # 0..19 <---- please update comment when adding/removing fields |
36 | my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER, ASN_OCTET_STR, ASN_OCTET_STR ); | 36 | my @fields = (ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_UNSIGNED, ASN_UNSIGNED, ASN_COUNTER, ASN_COUNTER64, ASN_UNSIGNED, ASN_COUNTER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER, ASN_OCTET_STR, ASN_OCTET_STR, ASN_INTEGER ); |
37 | my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"', 'CUSTOM CHECK OK: foo is 12345', -2, '-4', '-6.6' ); | 37 | my @values = ($multiline, $multilin2, $multilin3, $multilin4, $multilin5, 4294965296, 1000, 4294965296, uint64("18446744073709351616"), int(rand(2**32)), 64000, "stringtests", "3.5", "87.4startswithnumberbutshouldbestring", '555"I said"', 'CUSTOM CHECK OK: foo is 12345', -2, '-4', '-6.6', 42 ); |
38 | # undef increments are randomized | 38 | # undef increments are randomized |
39 | my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef, undef, -1, undef, undef ); | 39 | my @incrts = (undef, undef, undef, undef, undef, 1000, -500, 1000, 100000, undef, 666, undef, undef, undef, undef, undef, -1, undef, undef, 0 ); |
40 | 40 | ||
41 | # Number of elements in our OID | 41 | # Number of elements in our OID |
42 | my $oidelts; | 42 | my $oidelts; |
diff --git a/plugins/tests/var/ps-axwo.debian b/plugins/tests/var/ps-axwo.debian new file mode 100644 index 0000000..5889e9a --- /dev/null +++ b/plugins/tests/var/ps-axwo.debian | |||
@@ -0,0 +1,219 @@ | |||
1 | STAT UID PID PPID VSZ RSS %CPU ELAPSED COMMAND COMMAND | ||
2 | Ss 0 1 0 167244 7144 0.1 26-03:07:26 systemd /lib/systemd/systemd --system --deserialize 17 | ||
3 | S 0 2 0 0 0 0.0 26-03:07:26 kthreadd [kthreadd] | ||
4 | I< 0 3 2 0 0 0.0 26-03:07:26 rcu_gp [rcu_gp] | ||
5 | I< 0 4 2 0 0 0.0 26-03:07:26 rcu_par_gp [rcu_par_gp] | ||
6 | I< 0 6 2 0 0 0.0 26-03:07:26 kworker/0:0H-ev [kworker/0:0H-events_highpri] | ||
7 | I< 0 9 2 0 0 0.0 26-03:07:26 mm_percpu_wq [mm_percpu_wq] | ||
8 | S 0 10 2 0 0 0.0 26-03:07:26 rcu_tasks_rude_ [rcu_tasks_rude_] | ||
9 | S 0 11 2 0 0 0.0 26-03:07:26 rcu_tasks_trace [rcu_tasks_trace] | ||
10 | S 0 12 2 0 0 0.0 26-03:07:26 ksoftirqd/0 [ksoftirqd/0] | ||
11 | I 0 13 2 0 0 0.0 26-03:07:26 rcu_sched [rcu_sched] | ||
12 | S 0 14 2 0 0 0.0 26-03:07:26 migration/0 [migration/0] | ||
13 | S 0 15 2 0 0 0.0 26-03:07:26 cpuhp/0 [cpuhp/0] | ||
14 | S 0 16 2 0 0 0.0 26-03:07:26 cpuhp/1 [cpuhp/1] | ||
15 | S 0 17 2 0 0 0.0 26-03:07:26 migration/1 [migration/1] | ||
16 | S 0 18 2 0 0 0.0 26-03:07:26 ksoftirqd/1 [ksoftirqd/1] | ||
17 | I< 0 20 2 0 0 0.0 26-03:07:26 kworker/1:0H-ev [kworker/1:0H-events_highpri] | ||
18 | S 0 21 2 0 0 0.0 26-03:07:26 cpuhp/2 [cpuhp/2] | ||
19 | S 0 22 2 0 0 0.0 26-03:07:26 migration/2 [migration/2] | ||
20 | S 0 23 2 0 0 0.0 26-03:07:26 ksoftirqd/2 [ksoftirqd/2] | ||
21 | I< 0 25 2 0 0 0.0 26-03:07:26 kworker/2:0H-ev [kworker/2:0H-events_highpri] | ||
22 | S 0 26 2 0 0 0.0 26-03:07:26 cpuhp/3 [cpuhp/3] | ||
23 | S 0 27 2 0 0 0.0 26-03:07:26 migration/3 [migration/3] | ||
24 | S 0 28 2 0 0 0.0 26-03:07:26 ksoftirqd/3 [ksoftirqd/3] | ||
25 | I< 0 30 2 0 0 0.0 26-03:07:26 kworker/3:0H-ev [kworker/3:0H-events_highpri] | ||
26 | S 0 35 2 0 0 0.0 26-03:07:26 kdevtmpfs [kdevtmpfs] | ||
27 | I< 0 36 2 0 0 0.0 26-03:07:26 netns [netns] | ||
28 | S 0 37 2 0 0 0.0 26-03:07:26 kauditd [kauditd] | ||
29 | S 0 38 2 0 0 0.0 26-03:07:26 khungtaskd [khungtaskd] | ||
30 | S 0 39 2 0 0 0.0 26-03:07:26 oom_reaper [oom_reaper] | ||
31 | I< 0 40 2 0 0 0.0 26-03:07:26 writeback [writeback] | ||
32 | S 0 41 2 0 0 0.0 26-03:07:26 kcompactd0 [kcompactd0] | ||
33 | SN 0 42 2 0 0 0.0 26-03:07:26 ksmd [ksmd] | ||
34 | SN 0 43 2 0 0 0.0 26-03:07:26 khugepaged [khugepaged] | ||
35 | I< 0 62 2 0 0 0.0 26-03:07:26 kintegrityd [kintegrityd] | ||
36 | I< 0 63 2 0 0 0.0 26-03:07:26 kblockd [kblockd] | ||
37 | I< 0 64 2 0 0 0.0 26-03:07:26 blkcg_punt_bio [blkcg_punt_bio] | ||
38 | I< 0 65 2 0 0 0.0 26-03:07:26 edac-poller [edac-poller] | ||
39 | I< 0 66 2 0 0 0.0 26-03:07:26 devfreq_wq [devfreq_wq] | ||
40 | I< 0 67 2 0 0 0.0 26-03:07:26 kworker/2:1H-ev [kworker/2:1H-events_highpri] | ||
41 | S 0 70 2 0 0 0.3 26-03:07:25 kswapd0 [kswapd0] | ||
42 | I< 0 71 2 0 0 0.0 26-03:07:25 kthrotld [kthrotld] | ||
43 | I< 0 72 2 0 0 0.0 26-03:07:25 acpi_thermal_pm [acpi_thermal_pm] | ||
44 | I< 0 74 2 0 0 0.0 26-03:07:25 ipv6_addrconf [ipv6_addrconf] | ||
45 | I< 0 80 2 0 0 0.0 26-03:07:25 kworker/3:1H-ev [kworker/3:1H-events_highpri] | ||
46 | I< 0 84 2 0 0 0.0 26-03:07:25 kstrp [kstrp] | ||
47 | I< 0 87 2 0 0 0.0 26-03:07:25 zswap-shrink [zswap-shrink] | ||
48 | I< 0 110 2 0 0 0.0 26-03:07:25 kworker/0:1H-ev [kworker/0:1H-events_highpri] | ||
49 | I< 0 141 2 0 0 0.0 26-03:07:25 ata_sff [ata_sff] | ||
50 | S 0 143 2 0 0 0.0 26-03:07:25 scsi_eh_0 [scsi_eh_0] | ||
51 | I< 0 144 2 0 0 0.0 26-03:07:25 scsi_tmf_0 [scsi_tmf_0] | ||
52 | S 0 145 2 0 0 0.0 26-03:07:25 scsi_eh_1 [scsi_eh_1] | ||
53 | I< 0 146 2 0 0 0.0 26-03:07:25 scsi_tmf_1 [scsi_tmf_1] | ||
54 | S 0 147 2 0 0 0.0 26-03:07:25 scsi_eh_2 [scsi_eh_2] | ||
55 | I< 0 148 2 0 0 0.0 26-03:07:25 scsi_tmf_2 [scsi_tmf_2] | ||
56 | S 0 149 2 0 0 0.0 26-03:07:25 scsi_eh_3 [scsi_eh_3] | ||
57 | I< 0 150 2 0 0 0.0 26-03:07:25 scsi_tmf_3 [scsi_tmf_3] | ||
58 | S 0 151 2 0 0 0.0 26-03:07:25 scsi_eh_4 [scsi_eh_4] | ||
59 | I< 0 152 2 0 0 0.0 26-03:07:25 scsi_tmf_4 [scsi_tmf_4] | ||
60 | S 0 153 2 0 0 0.0 26-03:07:25 scsi_eh_5 [scsi_eh_5] | ||
61 | I< 0 154 2 0 0 0.0 26-03:07:25 scsi_tmf_5 [scsi_tmf_5] | ||
62 | S 0 158 2 0 0 0.0 26-03:07:25 card0-crtc0 [card0-crtc0] | ||
63 | S 0 159 2 0 0 0.0 26-03:07:25 card0-crtc1 [card0-crtc1] | ||
64 | S 0 160 2 0 0 0.0 26-03:07:25 card0-crtc2 [card0-crtc2] | ||
65 | I< 0 162 2 0 0 0.0 26-03:07:25 kworker/1:1H-ev [kworker/1:1H-events_highpri] | ||
66 | S 0 163 2 0 0 0.0 26-03:07:25 scsi_eh_6 [scsi_eh_6] | ||
67 | I< 0 164 2 0 0 0.0 26-03:07:25 scsi_tmf_6 [scsi_tmf_6] | ||
68 | S 0 165 2 0 0 0.0 26-03:07:25 usb-storage [usb-storage] | ||
69 | I< 0 167 2 0 0 0.0 26-03:07:25 uas [uas] | ||
70 | I< 0 176 2 0 0 0.0 26-03:07:25 kdmflush [kdmflush] | ||
71 | I< 0 177 2 0 0 0.0 26-03:07:25 kdmflush [kdmflush] | ||
72 | S 0 202 2 0 0 0.0 26-03:07:24 scsi_eh_7 [scsi_eh_7] | ||
73 | I< 0 203 2 0 0 0.0 26-03:07:24 scsi_tmf_7 [scsi_tmf_7] | ||
74 | S 0 204 2 0 0 0.0 26-03:07:24 usb-storage [usb-storage] | ||
75 | I< 0 232 2 0 0 0.0 26-03:07:23 btrfs-worker [btrfs-worker] | ||
76 | I< 0 233 2 0 0 0.0 26-03:07:23 btrfs-worker-hi [btrfs-worker-hi] | ||
77 | I< 0 234 2 0 0 0.0 26-03:07:23 btrfs-delalloc [btrfs-delalloc] | ||
78 | I< 0 235 2 0 0 0.0 26-03:07:23 btrfs-flush_del [btrfs-flush_del] | ||
79 | I< 0 236 2 0 0 0.0 26-03:07:23 btrfs-cache [btrfs-cache] | ||
80 | I< 0 237 2 0 0 0.0 26-03:07:23 btrfs-fixup [btrfs-fixup] | ||
81 | I< 0 238 2 0 0 0.0 26-03:07:23 btrfs-endio [btrfs-endio] | ||
82 | I< 0 239 2 0 0 0.0 26-03:07:23 btrfs-endio-met [btrfs-endio-met] | ||
83 | I< 0 240 2 0 0 0.0 26-03:07:23 btrfs-endio-met [btrfs-endio-met] | ||
84 | I< 0 241 2 0 0 0.0 26-03:07:23 btrfs-endio-rai [btrfs-endio-rai] | ||
85 | I< 0 242 2 0 0 0.0 26-03:07:23 btrfs-rmw [btrfs-rmw] | ||
86 | I< 0 243 2 0 0 0.0 26-03:07:23 btrfs-endio-wri [btrfs-endio-wri] | ||
87 | I< 0 244 2 0 0 0.0 26-03:07:23 btrfs-freespace [btrfs-freespace] | ||
88 | I< 0 245 2 0 0 0.0 26-03:07:23 btrfs-delayed-m [btrfs-delayed-m] | ||
89 | I< 0 246 2 0 0 0.0 26-03:07:23 btrfs-readahead [btrfs-readahead] | ||
90 | I< 0 247 2 0 0 0.0 26-03:07:23 btrfs-qgroup-re [btrfs-qgroup-re] | ||
91 | S 0 248 2 0 0 0.0 26-03:07:23 btrfs-cleaner [btrfs-cleaner] | ||
92 | S 0 249 2 0 0 0.2 26-03:07:23 btrfs-transacti [btrfs-transacti] | ||
93 | I< 0 317 2 0 0 0.0 26-03:07:22 rpciod [rpciod] | ||
94 | I< 0 322 2 0 0 0.0 26-03:07:22 xprtiod [xprtiod] | ||
95 | S 0 381 2 0 0 0.0 26-03:07:22 irq/133-mei_me [irq/133-mei_me] | ||
96 | S 0 422 2 0 0 0.0 26-03:07:22 watchdogd [watchdogd] | ||
97 | I< 0 523 2 0 0 0.0 26-03:07:22 led_workqueue [led_workqueue] | ||
98 | I< 0 583 2 0 0 0.0 26-03:07:22 cryptd [cryptd] | ||
99 | I< 0 590 2 0 0 0.0 26-03:07:22 ext4-rsv-conver [ext4-rsv-conver] | ||
100 | Ss 104 693 1 12324 4292 0.5 26-03:07:21 dbus-daemon /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation --syslog-only | ||
101 | Ss 0 731 1 575120 1368 0.0 26-03:07:21 systemd-logind /lib/systemd/systemd-logind | ||
102 | Ssl 0 1111 1 121248 732 0.0 26-03:07:18 unattended-upgr /usr/bin/python3 /usr/share/unattended-upgrades/unattended-upgrade-shutdown --wait-for-signal | ||
103 | S 0 1141 2 0 0 0.0 26-03:07:18 lockd [lockd] | ||
104 | I< 0 1459 2 0 0 0.0 26-03:07:16 nfsiod [nfsiod] | ||
105 | S 0 1621 2 0 0 0.0 26-03:07:15 NFSv4 callback [NFSv4 callback] | ||
106 | Ssl 0 1771 1 1548340 676 0.0 26-03:07:13 libvirtd /usr/sbin/libvirtd | ||
107 | I< 0 24315 2 0 0 0.0 26-02:49:02 cifsiod [cifsiod] | ||
108 | I< 0 24316 2 0 0 0.0 26-02:49:02 smb3decryptd [smb3decryptd] | ||
109 | I< 0 24317 2 0 0 0.0 26-02:49:02 cifsfileinfoput [cifsfileinfoput] | ||
110 | I< 0 24318 2 0 0 0.0 26-02:49:02 cifsoplockd [cifsoplockd] | ||
111 | I< 0 24319 2 0 0 0.0 26-02:49:02 cifs-dfscache [cifs-dfscache] | ||
112 | S 0 24322 2 0 0 0.0 26-02:49:02 cifsd [cifsd] | ||
113 | I< 0 24413 2 0 0 0.0 26-02:48:57 btrfs-worker [btrfs-worker] | ||
114 | I< 0 24414 2 0 0 0.0 26-02:48:57 btrfs-worker-hi [btrfs-worker-hi] | ||
115 | I< 0 24415 2 0 0 0.0 26-02:48:57 btrfs-delalloc [btrfs-delalloc] | ||
116 | I< 0 24416 2 0 0 0.0 26-02:48:57 btrfs-flush_del [btrfs-flush_del] | ||
117 | I< 0 24418 2 0 0 0.0 26-02:48:57 btrfs-cache [btrfs-cache] | ||
118 | I< 0 24419 2 0 0 0.0 26-02:48:57 btrfs-fixup [btrfs-fixup] | ||
119 | I< 0 24420 2 0 0 0.0 26-02:48:57 btrfs-endio [btrfs-endio] | ||
120 | I< 0 24421 2 0 0 0.0 26-02:48:57 btrfs-endio-met [btrfs-endio-met] | ||
121 | I< 0 24422 2 0 0 0.0 26-02:48:57 btrfs-endio-met [btrfs-endio-met] | ||
122 | I< 0 24423 2 0 0 0.0 26-02:48:57 btrfs-endio-rai [btrfs-endio-rai] | ||
123 | I< 0 24424 2 0 0 0.0 26-02:48:57 btrfs-rmw [btrfs-rmw] | ||
124 | I< 0 24425 2 0 0 0.0 26-02:48:57 btrfs-endio-wri [btrfs-endio-wri] | ||
125 | I< 0 24426 2 0 0 0.0 26-02:48:57 btrfs-freespace [btrfs-freespace] | ||
126 | I< 0 24427 2 0 0 0.0 26-02:48:57 btrfs-delayed-m [btrfs-delayed-m] | ||
127 | I< 0 24428 2 0 0 0.0 26-02:48:57 btrfs-readahead [btrfs-readahead] | ||
128 | I< 0 24429 2 0 0 0.0 26-02:48:57 btrfs-qgroup-re [btrfs-qgroup-re] | ||
129 | S 0 24450 2 0 0 0.0 26-02:48:53 btrfs-cleaner [btrfs-cleaner] | ||
130 | S 0 24451 2 0 0 0.0 26-02:48:53 btrfs-transacti [btrfs-transacti] | ||
131 | I< 0 747708 2 0 0 0.0 16-21:06:20 xfsalloc [xfsalloc] | ||
132 | I< 0 747709 2 0 0 0.0 16-21:06:20 xfs_mru_cache [xfs_mru_cache] | ||
133 | S 0 747713 2 0 0 0.0 16-21:06:20 jfsIO [jfsIO] | ||
134 | S 0 747714 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit] | ||
135 | S 0 747715 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit] | ||
136 | S 0 747716 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit] | ||
137 | S 0 747717 2 0 0 0.0 16-21:06:20 jfsCommit [jfsCommit] | ||
138 | S 0 747718 2 0 0 0.0 16-21:06:20 jfsSync [jfsSync] | ||
139 | Ss 0 1071687 1 105976 28304 0.0 3-03:12:31 systemd-journal /lib/systemd/systemd-journald | ||
140 | Ss 0 1934146 1 25672 4704 0.0 11:19:31 cupsd /usr/sbin/cupsd -l | ||
141 | Ssl 0 1934148 1 182868 8540 0.0 11:19:31 cups-browsed /usr/sbin/cups-browsed | ||
142 | S 13 1934155 3392655 5752 88 0.0 11:19:31 pinger (pinger) | ||
143 | S< 33 1934166 3393034 57996 5460 0.0 11:19:31 apache2 /usr/sbin/apache2 -k start | ||
144 | S< 33 1934167 3393034 216944 13892 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start | ||
145 | S< 33 1934168 3393034 216944 13756 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start | ||
146 | S< 33 1934169 3393034 216936 13732 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start | ||
147 | S< 33 1934170 3393034 216944 13888 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start | ||
148 | S< 33 1934172 3393034 216944 15388 0.0 11:19:30 apache2 /usr/sbin/apache2 -k start | ||
149 | S< 33 1934701 3393034 216936 13736 0.0 11:19:29 apache2 /usr/sbin/apache2 -k start | ||
150 | S< 33 1935056 3393034 216920 13724 0.0 11:19:28 apache2 /usr/sbin/apache2 -k start | ||
151 | S 7 1936834 1934146 16652 832 0.0 11:18:12 dbus /usr/lib/cups/notifier/dbus dbus:// | ||
152 | S< 33 1955909 3393034 216928 13792 0.0 11:00:25 apache2 /usr/sbin/apache2 -k start | ||
153 | I< 0 2531464 2 0 0 0.0 06:35:47 kworker/u9:0-i9 [kworker/u9:0-i915_flip] | ||
154 | I 0 2570506 2 0 0 0.0 06:27:41 kworker/1:0-cgr [kworker/1:0-cgroup_destroy] | ||
155 | I 0 2596195 2 0 0 0.0 06:21:52 kworker/1:1-eve [kworker/1:1-events] | ||
156 | I 0 2785341 2 0 0 0.0 03:34:16 kworker/u8:8-bt [kworker/u8:8-btrfs-endio-write] | ||
157 | I 0 2785520 2 0 0 0.0 03:33:50 kworker/3:0-eve [kworker/3:0-events] | ||
158 | I 0 2798669 2 0 0 0.0 03:21:09 kworker/u8:5-bt [kworker/u8:5-btrfs-endio-write] | ||
159 | Ss 0 2803015 1 5616 3108 0.0 03:17:54 cron /usr/sbin/cron -f | ||
160 | I 0 2845483 2 0 0 0.0 02:38:11 kworker/0:3-eve [kworker/0:3-events] | ||
161 | I 0 2939490 2 0 0 0.1 01:10:32 kworker/0:0-eve [kworker/0:0-events] | ||
162 | I 0 2939754 2 0 0 0.0 01:10:26 kworker/u8:1-i9 [kworker/u8:1-i915] | ||
163 | I 0 2942040 2 0 0 0.0 01:08:02 kworker/u8:7-bt [kworker/u8:7-btrfs-endio-meta] | ||
164 | S 117 2954268 3392551 40044 5772 0.0 56:37 pickup pickup -l -t unix -u -c | ||
165 | I 0 2965195 2 0 0 0.0 46:00 kworker/u8:0-bt [kworker/u8:0-btrfs-worker] | ||
166 | I 0 2977972 2 0 0 0.0 33:54 kworker/u8:2-bt [kworker/u8:2-btrfs-endio-write] | ||
167 | I 0 2985488 2 0 0 0.0 27:02 kworker/u8:3-bl [kworker/u8:3-blkcg_punt_bio] | ||
168 | I 0 2987519 2 0 0 1.0 25:15 kworker/2:1-eve [kworker/2:1-events] | ||
169 | I 0 2987601 2 0 0 0.0 25:03 kworker/u8:9-i9 [kworker/u8:9-i915] | ||
170 | I< 0 2995218 2 0 0 0.0 18:41 kworker/u9:2-xp [kworker/u9:2-xprtiod] | ||
171 | I 0 2997170 2 0 0 0.0 16:41 kworker/3:1-rcu [kworker/3:1-rcu_gp] | ||
172 | I 0 3001264 2 0 0 0.0 13:01 kworker/u8:4-bt [kworker/u8:4-btrfs-endio-write] | ||
173 | I 0 3004697 2 0 0 0.7 09:41 kworker/2:0-eve [kworker/2:0-events] | ||
174 | I 0 3010619 2 0 0 1.0 04:29 kworker/2:2-eve [kworker/2:2-events] | ||
175 | I 0 3014612 2 0 0 0.0 00:41 kworker/3:2-eve [kworker/3:2-events] | ||
176 | S 0 3015082 2803015 6716 3028 0.0 00:30 cron /usr/sbin/CRON -f | ||
177 | I 0 3015382 2 0 0 0.0 00:00 kworker/u8:6-bt [kworker/u8:6-btrfs-endio-meta] | ||
178 | Ss 1 3392068 1 5592 504 0.0 15-02:34:39 atd /usr/sbin/atd -f | ||
179 | Ssl 0 3392072 1 235796 1740 0.0 15-02:34:39 accounts-daemon /usr/libexec/accounts-daemon | ||
180 | Ssl 106 3392076 1 315708 6128 0.0 15-02:34:39 colord /usr/libexec/colord | ||
181 | Ss 0 3392083 1 8120 720 0.0 15-02:34:39 haveged /usr/sbin/haveged --Foreground --verbose=1 | ||
182 | Ss 0 3392090 1 5168 132 0.0 15-02:34:39 blkmapd /usr/sbin/blkmapd | ||
183 | SNsl 111 3392094 1 155648 440 0.0 15-02:34:39 rtkit-daemon /usr/libexec/rtkit-daemon | ||
184 | Ssl 0 3392097 1 290168 1352 0.0 15-02:34:39 packagekitd /usr/libexec/packagekitd | ||
185 | Ss 128 3392100 1 7960 448 0.0 15-02:34:39 rpcbind /sbin/rpcbind -f -w | ||
186 | Ss 0 3392114 1 13432 616 0.0 15-02:34:39 systemd-machine /lib/systemd/systemd-machined | ||
187 | Ss 0 3392118 1 13316 848 0.0 15-02:34:39 sshd sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups | ||
188 | Ssl 0 3392124 1 244072 2456 0.0 15-02:34:39 upowerd /usr/libexec/upowerd | ||
189 | Ssl 0 3392138 1 1634748 10684 0.0 15-02:34:39 containerd /usr/bin/containerd | ||
190 | Ssl 0 3392139 1 222768 1784 0.0 15-02:34:39 rsyslogd /usr/sbin/rsyslogd -n -iNONE | ||
191 | Ss 13 3392140 1 3344 152 0.0 15-02:34:39 polipo /usr/bin/polipo -c /etc/polipo/config pidFile=/var/run/polipo/polipo.pid daemonise=true | ||
192 | Ssl 119 3392156 1 76472 1688 0.0 15-02:34:39 ntpd /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 119:126 | ||
193 | Ss 120 3392168 1 4656 276 0.0 15-02:34:39 rpc.statd /sbin/rpc.statd --no-notify | ||
194 | Ss 0 3392171 1 5072 432 0.0 15-02:34:39 rpc.mountd /usr/sbin/rpc.mountd --manage-gids | ||
195 | Ss 0 3392176 1 5008 288 0.0 15-02:34:39 rpc.idmapd /usr/sbin/rpc.idmapd | ||
196 | Ss 105 3392184 1 15544 6816 3.5 15-02:34:39 avahi-daemon avahi-daemon: running [tsui.local] | ||
197 | Ss 0 3392186 1 25288 3860 0.0 15-02:34:39 systemd-udevd /lib/systemd/systemd-udevd | ||
198 | S 105 3392190 3392184 8788 52 0.0 15-02:34:39 avahi-daemon avahi-daemon: chroot helper | ||
199 | Ssl 0 3392197 1 396120 4188 0.0 15-02:34:39 udisksd /usr/libexec/udisks2/udisksd | ||
200 | Ssl 0 3392214 1 237504 6632 0.0 15-02:34:39 polkitd /usr/libexec/polkitd --no-debug | ||
201 | Ss 0 3392284 1 9684 560 0.0 15-02:34:38 xinetd /usr/sbin/xinetd -pidfile /run/xinetd.pid -stayalive -inetd_compat -inetd_ipv6 | ||
202 | Ssl 0 3392285 1 314840 1352 0.0 15-02:34:38 ModemManager /usr/sbin/ModemManager | ||
203 | Ss 0 3392317 1 2352 140 0.0 15-02:34:38 acpid /usr/sbin/acpid | ||
204 | S 0 3392400 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
205 | S 0 3392401 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
206 | S 0 3392402 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
207 | S 0 3392403 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
208 | S 0 3392404 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
209 | S 0 3392405 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
210 | S 0 3392407 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
211 | S 0 3392410 2 0 0 0.0 15-02:34:38 nfsd [nfsd] | ||
212 | Ss 0 3392551 1 40092 1304 0.0 15-02:34:37 master /usr/lib/postfix/sbin/master -w | ||
213 | S 117 3392553 3392551 40156 568 0.0 15-02:34:37 qmgr qmgr -l -t unix -u | ||
214 | Ss 0 3392650 1 63652 4 0.0 15-02:34:36 squid /usr/sbin/squid --foreground -sYC | ||
215 | Ssl 116 3392652 1 1675196 93848 0.0 15-02:34:36 mariadbd /usr/sbin/mariadbd | ||
216 | S 13 3392655 3392650 81776 21232 0.0 15-02:34:36 squid (squid-1) --kid squid-1 --foreground -sYC | ||
217 | S 13 3392657 3392655 5572 68 0.0 15-02:34:36 log_file_daemon (logfile-daemon) /var/log/squid/access.log | ||
218 | S<s 0 3393034 1 216648 7560 0.0 15-02:34:34 apache2 /usr/sbin/apache2 -k start | ||
219 | Ss 33 3393037 1 3432 180 0.0 15-02:34:34 htcacheclean /usr/bin/htcacheclean -d 120 -p /var/cache/apache2/mod_cache_disk -l 300M -n | ||
diff --git a/plugins/tests/var/ps_axwo.debian b/plugins/tests/var/ps_axwo.debian deleted file mode 100644 index 37a2d35..0000000 --- a/plugins/tests/var/ps_axwo.debian +++ /dev/null | |||
@@ -1,84 +0,0 @@ | |||
1 | STAT UID PID PPID VSZ RSS %CPU COMMAND COMMAND | ||
2 | S 0 1 0 1504 428 0.0 init init [2] | ||
3 | SN 0 2 1 0 0 0.0 ksoftirqd/0 [ksoftirqd/0] | ||
4 | S< 0 3 1 0 0 0.0 events/0 [events/0] | ||
5 | S< 0 4 3 0 0 0.0 khelper [khelper] | ||
6 | S< 0 5 3 0 0 0.0 kacpid [kacpid] | ||
7 | S< 0 38 3 0 0 0.0 kblockd/0 [kblockd/0] | ||
8 | S 0 48 3 0 0 0.0 pdflush [pdflush] | ||
9 | S< 0 51 3 0 0 0.0 aio/0 [aio/0] | ||
10 | S 0 50 1 0 0 0.0 kswapd0 [kswapd0] | ||
11 | S 0 193 1 0 0 0.0 kseriod [kseriod] | ||
12 | S 0 214 1 0 0 0.0 scsi_eh_0 [scsi_eh_0] | ||
13 | S 0 221 1 0 0 0.0 khubd [khubd] | ||
14 | S 0 299 1 0 0 0.3 kjournald [kjournald] | ||
15 | S 0 1148 1 0 0 0.0 pciehpd_event [pciehpd_event] | ||
16 | S 0 1168 1 0 0 0.0 shpchpd_event [shpchpd_event] | ||
17 | Ss 1 1795 1 1612 276 0.0 portmap /sbin/portmap | ||
18 | Ss 0 2200 1 1652 568 0.0 vmware-guestd /usr/sbin/vmware-guestd --background /var/run/vmware-guestd.pid | ||
19 | Ss 0 2209 1 2240 532 0.0 inetd /usr/sbin/inetd | ||
20 | Ss 0 2319 1 3468 792 0.0 sshd /usr/sbin/sshd | ||
21 | Ss 0 2323 1 2468 676 0.0 rpc.statd /sbin/rpc.statd | ||
22 | Ss 1 2332 1 1684 488 0.0 atd /usr/sbin/atd | ||
23 | Ss 0 2335 1 1764 636 0.0 cron /usr/sbin/cron | ||
24 | Ss+ 0 2350 1 1500 348 0.0 getty /sbin/getty 38400 tty1 | ||
25 | Ss+ 0 2351 1 1500 348 0.0 getty /sbin/getty 38400 tty2 | ||
26 | Ss+ 0 2352 1 1500 348 0.0 getty /sbin/getty 38400 tty3 | ||
27 | Ss+ 0 2353 1 1500 348 0.0 getty /sbin/getty 38400 tty4 | ||
28 | Ss+ 0 2354 1 1500 348 0.0 getty /sbin/getty 38400 tty5 | ||
29 | Ss+ 0 2355 1 1500 348 0.0 getty /sbin/getty 38400 tty6 | ||
30 | S 0 6907 1 2308 892 0.0 mysqld_safe /bin/sh /usr/bin/mysqld_safe | ||
31 | S 103 6944 6907 123220 27724 0.0 mysqld /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock | ||
32 | S 0 6945 6907 1488 420 0.0 logger logger -p daemon.err -t mysqld_safe -i -t mysqld | ||
33 | S 1001 17778 1 6436 1588 0.0 snmpd /usr/sbin/snmpd -u nagios -Lsd -Lf /dev/null -p/var/run/snmpd.pid | ||
34 | Ss 0 17789 1 9496 5556 0.0 snmptrapd /usr/sbin/snmptrapd -t -m ALL -M /usr/share/snmp/mibs:/usr/local/monitoring/snmp/load -p /var/run/snmptrapd.pid | ||
35 | Ss 0 847 2319 14452 1752 0.0 sshd sshd: tonvoon [priv] | ||
36 | S 1000 857 847 14616 1832 0.0 sshd sshd: tonvoon@pts/3 | ||
37 | Ss 1000 860 857 2984 1620 0.0 bash -bash | ||
38 | S 0 868 860 2588 1428 0.0 bash -su | ||
39 | S+ 1001 877 868 2652 1568 0.0 bash -su | ||
40 | S 0 6086 3 0 0 0.0 pdflush [pdflush] | ||
41 | Ss 0 17832 2319 14452 1752 0.0 sshd sshd: tonvoon [priv] | ||
42 | S 1000 18155 17832 14620 1840 0.0 sshd sshd: tonvoon@pts/0 | ||
43 | Ss 1000 18156 18155 2984 1620 0.0 bash -bash | ||
44 | S 0 18518 18156 2588 1428 0.0 bash -su | ||
45 | S 1001 18955 18518 2672 1600 0.0 bash -su | ||
46 | Ss 0 21683 2319 14452 1756 0.0 sshd sshd: tonvoon [priv] | ||
47 | S 1000 21742 21683 14620 1896 0.0 sshd sshd: tonvoon@pts/1 | ||
48 | Ss 1000 21743 21742 2984 1620 0.0 bash -bash | ||
49 | S 0 21748 21743 2592 1432 0.0 bash -su | ||
50 | S 1001 21757 21748 2620 1540 0.0 bash -su | ||
51 | Ss 0 2334 2319 14452 1756 0.0 sshd sshd: tonvoon [priv] | ||
52 | S 1000 2343 2334 14620 1840 0.0 sshd sshd: tonvoon@pts/2 | ||
53 | Ss 1000 2344 2343 2984 1620 0.0 bash -bash | ||
54 | S 0 2349 2344 2592 1432 0.0 bash -su | ||
55 | S+ 1001 2364 2349 2620 1520 0.0 bash -su | ||
56 | T 1001 2454 2364 2096 1032 0.0 vi vi configure.in.rej | ||
57 | S+ 1001 8500 21757 69604 52576 0.0 opsview_web_ser /usr/bin/perl -w ./script/opsview_web_server.pl -f -d | ||
58 | Ss 0 7609 2319 14452 1756 0.0 sshd sshd: tonvoon [priv] | ||
59 | S 1000 7617 7609 14460 1828 0.0 sshd sshd: tonvoon@pts/4 | ||
60 | Ss 1000 7618 7617 2984 1620 0.0 bash -bash | ||
61 | S 0 7623 7618 2592 1432 0.0 bash -su | ||
62 | S+ 1001 7632 7623 2620 1528 0.0 bash -su | ||
63 | Ss 1001 12678 1 20784 17728 0.0 opsviewd opsviewd | ||
64 | Ss 0 832 1 14512 6360 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
65 | S 33 842 832 14648 6596 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
66 | S 33 843 832 14512 6504 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
67 | S 33 844 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
68 | S 33 845 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
69 | S 33 846 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
70 | Ss 7 4081 1 2464 884 0.0 lpd /usr/sbin/lpd -s | ||
71 | S 33 26484 832 14512 6476 0.0 apache2 /usr/sbin/apache2 -k start -DSSL | ||
72 | Ss 1001 22324 1 20252 1612 0.1 nagios ../../bin/nagios -d /usr/local/nagios/etc/nagios.cfg | ||
73 | Ss 0 23336 2319 14452 1756 0.0 sshd sshd: tonvoon [priv] | ||
74 | S 1000 23339 23336 14620 1840 0.0 sshd sshd: tonvoon@pts/5 | ||
75 | Ss 1000 23340 23339 2996 1636 0.0 bash -bash | ||
76 | S 0 23367 23340 3020 1628 0.0 bash bash | ||
77 | S 1001 23370 23367 3064 1748 0.0 bash bash | ||
78 | Ss 1001 23783 1 3220 764 0.0 ndo2db /usr/local/nagios/bin/ndo2db -c /usr/local/nagios/etc/ndo2db.cfg | ||
79 | Ss 1001 23784 1 6428 4948 0.0 import_ndologsd import_ndologsd | ||
80 | S+ 1001 9803 18955 4132 1936 0.0 ssh ssh altinity@cube02.lei.altinity | ||
81 | S 1001 22505 22324 20256 1616 0.0 nagios ../../bin/nagios -d /usr/local/nagios/etc/nagios.cfg | ||
82 | S 1001 22506 22505 1676 608 0.0 check_ping /usr/local/libexec/check_ping -H 192.168.10.23 -w 3000.0,80% -c 5000.0,100% -p 1 | ||
83 | S 1001 22507 22506 1660 492 0.0 ping /bin/ping -n -U -w 10 -c 1 192.168.10.23 | ||
84 | R+ 1001 22508 23370 2308 680 0.0 ps ps axwo stat uid pid ppid vsz rss pcpu comm args | ||