1
0
mirror of https://github.com/minio/mc.git synced 2025-11-10 13:42:32 +03:00
Commit Graph

58 Commits

Author SHA1 Message Date
Harshavardhana
cf7e0ae050 generalize input for ctx.Command.Name (#4338) 2022-11-01 08:04:26 -07:00
Krishnan Parthasarathi
5b0fc3ef94 feat: admin-rebalance subcommands (#4186) 2022-10-29 22:10:17 -07:00
Harshavardhana
27322636ae feat: Introduce 'mc batch' command (#4225) 2022-10-09 14:10:59 -07:00
Harshavardhana
2f1d44eee2 convert tabs to spaces in all commands (#4275) 2022-09-29 11:14:57 -07:00
Anis Elleuch
f85086b153 Use a pager for help output (#4245) 2022-09-28 11:28:02 -07:00
Anis Elleuch
145da32419 Add --request-header to trace cmd to filter http requests (#4238)
e.g:

`mc admin trace --request-header "User-Agent: *hadoop*" <alias>`
   to print all S3 requests sent by Hadoop

`mc admin trace --request-header "!X-Minio-Source*" <alias>`
   to avoid printing S3 requests related to replication
2022-09-12 10:12:06 -07:00
Klaus Post
2c9a733cae Add mc admin trace --call=healing (#4229)
Provide healing operation traces.

See https://github.com/minio/minio/pull/15616 for basic implementation.
2022-08-31 08:17:02 -07:00
Harshavardhana
41e6cc5626 fix: use DurationFlag to response-threshold (#4227)
Also add missing flags from 'mc admin scanner trace'
2022-08-30 08:15:54 -07:00
Krishnan Parthasarathi
d691fc4c9f Add trace support for decommissioning (#4195) 2022-08-10 10:14:21 -07:00
Harshavardhana
7838be4a7f apply --status-code only for HTTP traces if present (#4189)
fixes #4188
2022-08-08 08:33:23 -07:00
Klaus Post
48e9183957 Move mc admin top scanner -> mc admin scanner info (#4151)
Also, add `mc admin scanner trace` which gives a simplified trace 
with only relevant options.
2022-07-15 02:20:55 -07:00
Klaus Post
82a6c4f20f Add admin top scanner & trace --call=scanner (#4130)
mc: Add admin top scanner & trace --call=scanner

Examples:
```
λ mc admin top scanner myminio
Scanner Activity: ●∙∙
+-------------------------------------------------------------------------------------------------------+
| Last full scan time:   0d0h5m; Estimated 7358.44/month                                                |
| Current cycle:         129439; Started: 2022-06-22 18:01:50.5775259 +0200 CEST                        |
| Active disks:          1                                                                              |
| -------------------------------------- Last Minute Statistics --------------------------------------- |
| Objects Scanned:       101 objects; Avg: 3.775ms; Rate: 145440/day                                    |
| Versions Scanned:      10001 versions; Avg: 31.998µs; Rate: 14401440/day                              |
| Versions Heal Checked: 200 versions; Avg: 1.394ms; Rate: 288000/day                                   |
| Read Metadata:         101 objects; Avg: 0ms                                                          |
| ILM checks:            10001 versions; Avg: 408ns                                                     |
| Check Replication:     10001 versions; Avg: 3.646µs                                                   |
| Verify Deleted:        0 folders; Avg: 0ms                                                            |
| Yield:                 59.083s total; Avg: 584.978ms/obj                                              |
| ------------------------------------- Currently Scanning Paths -------------------------------------- |
| 127.0.0.1:9002/d:/data/distxl-plain/s2/d1/warp-benchmark-bucket/qwrShN3c/405.M(nsCrNI(PZhkAqA.rnd     |
+-------------------------------------------------------------------------------------------------------+
```

```
λ mc admin trace --call=scanner myminio
2022-06-22T18:04:12.705 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/2425.mLeCC9gkg)7aQxfJ.rnd 15.2171467s
2022-06-22T18:04:28.022 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/304.SAWTkh9)WJrnZF7l.rnd/xl.meta 1.0691ms
2022-06-22T18:04:27.922 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/304.SAWTkh9)WJrnZF7l.rnd 209.3969ms
2022-06-22T18:04:28.232 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/405.(kO1pyUPMdhsaXev.rnd/xl.meta 1.0531ms
2022-06-22T18:04:28.131 [SCANNER] scanner.ScanFolder 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 warp-benchmark-bucket/ajJkH6Ic/405.(kO1pyUPMdhsaXev.rnd 207.7757ms
2022-06-22T18:04:28.440 [SCANNER] scanner.ScanObject 127.0.0.1:9002 d:\data\distxl-plain\s2\d4 ajJkH6Ic/506.E726EiB(GNLfSLro.rnd/xl.meta 1.0317ms
...
```
2022-07-01 16:04:04 -07:00
Harshavardhana
e19fcb8daf feat: Add 'mc admin top api' for realtime view (#4112)
This is just a beginning but this can be enhanced further
to have different views of S3 calls, internal calls, and
disk/storage calls.
2022-06-10 11:02:26 -07:00
Anis Elleuch
8ca59cdebf trace: Show milliseconds in trace output (#4083)
Trace output without --verbose was always missing milliseconds precision
due to a typo in the code. This commit fixes the issue.
2022-05-11 10:17:36 -07:00
Poorna
d6ffdbc8fb admin trace: convert trace type to string in json fmt (#4029) 2022-03-25 01:52:53 -07:00
Harshavardhana
a59f9e4d30 add gofumpt support, automated cleanup (#3911) 2022-01-06 10:55:40 -08:00
Robert Lützner
6e1d044f91 admin-trace: Add missing asterisk to --path example in usage (#3857)
Limiting tracing to a specific path requires an asterisk at the end. I
don't know if this is a regression or the example was always wrong. I
only ever figured this out by trial and error.

This fixes #3856.

Co-authored-by: Robert Lützner <robert.luetzner@iternity.com>
2021-11-03 09:34:32 -07:00
Harshavardhana
ae271e7645 add new linters and fix unnecessary type conversions (#3835) 2021-10-14 15:33:31 -07:00
Harshavardhana
1f997000a3 trace: multiple values for headers are ',' separated (#3798) 2021-09-16 08:55:08 -07:00
Klaus Post
a1ba511f16 trace: Display times in local timezone (#3750)
Make sure times are converted to local time zone.
2021-06-29 08:48:12 -07:00
Harshavardhana
91efd0c066 migrate mc to minio/pkg (#3731)
remove all dependency for minio/minio
2021-05-29 09:30:33 -07:00
Harshavardhana
ac08bf41a7 fix: gofmt on some files 2021-05-11 17:46:41 -07:00
Harshavardhana
1402987ccb change license to AGPLv3 2021-05-11 17:45:08 -07:00
Harshavardhana
6c3ac00e18 update madmin to github.com/minio/madmin-go (#3710) 2021-05-06 13:33:17 -07:00
Poorna Krishnamoorthy
c4890d949b trace: display time in UTC format (#3708) 2021-05-03 11:52:16 -07:00
Anis Elleuch
78e3c94f5a trace: Make evaluation filters more user friendly (#3642)
Currently trace filters are like OR operations, but I think in debugging
we want AND instead.

Currently, --status-code 503 --path 'bucket/path'  will show 503 requests or
requests with 'bucket/path', this PR will require having both conditions
in the requests in order to be shown in the trace.
2021-04-16 08:56:26 -07:00
Anis Elleuch
4380288249 trace: Add support of older admin tarce API (#3683) 2021-04-07 12:25:53 -07:00
Harshavardhana
6074aa43ff add nodeName and path properly for os/storage calls (#3670) 2021-03-28 08:07:34 -07:00
Anis Elleuch
9914d28527 trace: Add support of Storage & OS tracing (#3663) 2021-03-27 05:38:57 -07:00
Poorna Krishnamoorthy
0ee9471197 trace: fix missing client info for ipv6 (#3661)
fixes: https://github.com/minio/minio/issues/11833
2021-03-24 03:50:02 -07:00
Anis Elleuch
d759f195f2 trace: Add source IP in verbose mode (#3612)
Add the source IP information in the REQUEST trace line when the verbose
mode is enabled.
2021-02-12 21:32:08 -08:00
Harshavardhana
1c3e6516f0 allow trace filters on handler names (#3568)
also convert the filter options to slice flags, for example
if you wish to trace only for status code 404 and 503 then
you would specify the following command

```
mc admin trace --status-code 404 --status-code 503 myminio/
```

Refactor and make implementation more readable.
2021-01-19 02:20:34 -08:00
Anis Elleuch
e7df97d1e0 trace: Add more filters options (#3556)
Filter options are necessary if the server receives a lot of requests,
especially when the verbose mode is passed.
2021-01-04 21:00:48 -08:00
Anis Elleuch
d4fbfb5975 Show better looking help when a wrong flag is passed (#3461) 2020-12-02 22:19:26 -08:00
Harshavardhana
d24de97cde pretty print KMS key status (#3412) 2020-09-23 08:32:57 -07:00
Harshavardhana
b7e4a633d8 rename all 'cannot' messages to 'unable to' (#3388) 2020-09-01 15:40:31 -07:00
Harshavardhana
f9dc22561c fix: mc rb site-wide removal with versioning (#3355) 2020-08-12 14:19:10 -07:00
Harshavardhana
0b0acc611f Revert "cli: Load global flags in initBeforeRunningCmd (#3283)" (#3302)
This reverts commit 712ff33319.
2020-07-16 11:10:35 -07:00
Anis Elleuch
712ff33319 cli: Load global flags in initBeforeRunningCmd (#3283)
app.Before receives a cli.Context but without flags parsed. There is no
point calling ctx.Bool() or ctx.IsSet() at that stage.

However, flags are parsed in commands, so minio initialization and
setting global variables (globalJSON, globalQuiet, etc..) can be moved
to the Before function of all commands.

Avoid setting command.Before for non leaf commands, otherwise Before
function will be called multiples times until it reaches the leaf
command.
2020-07-01 17:28:43 -07:00
Harshavardhana
8cae137525 fix all the build errors 2020-04-03 22:22:20 -07:00
Anis Elleuch
64a78e7811 Add global context and adapt context change in admin API (#3125)
This commit adds a new global context, monitors os signals
and cancels the global context in such cases to exit
on going process gracefully.

It will also update minio-go and adapts the code with
the new context changes in the admin API.
2020-03-21 13:42:41 -07:00
Harshavardhana
9663319e9e Update mc dependencies to recent dep change on MinIO (#3026) 2019-12-31 11:27:59 -08:00
Nitish Tiwari
f6240587db Fix arrow signs to use more common U+2191 & U+2193 (#2942) 2019-10-27 20:55:36 -07:00
poornas
0f8345b207 trace - Add TimeToFirstByte to output in --json mode (#2904) 2019-10-09 01:25:54 +05:30
ebozduman
a9c606f119 Customize service help for Windows/Linux users (#2908) 2019-09-28 08:33:28 +05:30
Harshavardhana
54ee3a2800 Migrate to go1.13 (#2888) 2019-09-09 02:54:43 +05:30
Harshavardhana
5fc35b6682 Fix admin help messages and docs (#2884) 2019-09-06 10:07:30 -07:00
Harshavardhana
bd7564a2d4 Add 'mc admin update' command (#2857)
Also this PR deprecates `service status` command
2019-08-28 15:57:25 -07:00
Sidhartha Mani
64d45ac35a fix formatting for admin trace (#2854) 2019-08-16 16:57:40 -07:00
Harshavardhana
0f360131cb Remove runtime checks use go build tag (#2848)
Project can be only built with go1.12 or newer
other build related changes to use new go1.12
features.

Fixes #2815
2019-08-06 15:41:04 -07:00