You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
returnfmt.Errorf("The Swarm.ResourceMgr.Limits configuration has been removed in Kubo 0.19 and should be empty or not present. To set custom libp2p limits, read https://github.com/ipfs/kubo/blob/master/docs/libp2p-resource-management.md#user-supplied-override-limits")
@@ -323,30 +323,13 @@ var swarmPeersCmd = &cmds.Command{
323
323
Type: connInfos{},
324
324
}
325
325
326
-
varswarmStatsCmd=&cmds.Command{
326
+
varswarmResourcesCmd=&cmds.Command{
327
327
Status: cmds.Experimental,
328
328
Helptext: cmds.HelpText{
329
-
Tagline: "Report resource usage for a scope.",
330
-
LongDescription: `Report resource usage for a scope.
331
-
The scope can be one of the following:
332
-
- system -- reports the system aggregate resource usage.
333
-
- transient -- reports the transient resource usage.
334
-
- svc:<service> -- reports the resource usage of a specific service.
335
-
- proto:<proto> -- reports the resource usage of a specific protocol.
336
-
- peer:<peer> -- reports the resource usage of a specific peer.
337
-
- all -- reports the resource usage for all currently active scopes.
338
-
339
-
The output of this command is JSON.
340
-
341
-
To see all resources that are close to hitting their respective limit, one can do something like:
342
-
ipfs swarm stats --min-used-limit-perc=90 all
329
+
Tagline: "Get a summary about all resources accounted for by the libp2p Resource Manager.",
330
+
LongDescription: `Get a summary about all resources accounted for by the libp2p Resource Manager. This includes the limits and the usage against those limits.
331
+
This can output a human readable table and JSON encoding.
343
332
`},
344
-
Arguments: []cmds.Argument{
345
-
cmds.StringArg("scope", true, false, "scope of the stat report"),
346
-
},
347
-
Options: []cmds.Option{
348
-
cmds.IntOption(swarmUsedResourcesPercentageName, "Only display resources that are using above the specified percentage of their respective limit"),
349
-
},
350
333
Run: func(req*cmds.Request, res cmds.ResponseEmitter, env cmds.Environment) error {
351
334
node, err:=cmdenv.GetNode(env)
352
335
iferr!=nil {
@@ -357,128 +340,68 @@ To see all resources that are close to hitting their respective limit, one can d
357
340
returnlibp2p.ErrNoResourceMgr
358
341
}
359
342
360
-
iflen(req.Arguments) !=1 {
361
-
returnfmt.Errorf("must specify exactly one scope")
0 commit comments