|
|
@ -46,17 +46,22 @@ var debugCmd = &ffcli.Command{
|
|
|
|
Exec: runDaemonGoroutines,
|
|
|
|
Exec: runDaemonGoroutines,
|
|
|
|
ShortHelp: "print tailscaled's goroutines",
|
|
|
|
ShortHelp: "print tailscaled's goroutines",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
&ffcli.Command{
|
|
|
|
{
|
|
|
|
|
|
|
|
Name: "metrics",
|
|
|
|
|
|
|
|
Exec: runDaemonMetrics,
|
|
|
|
|
|
|
|
ShortHelp: "print tailscaled's metrics",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
Name: "env",
|
|
|
|
Name: "env",
|
|
|
|
Exec: runEnv,
|
|
|
|
Exec: runEnv,
|
|
|
|
ShortHelp: "print cmd/tailscale environment",
|
|
|
|
ShortHelp: "print cmd/tailscale environment",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
&ffcli.Command{
|
|
|
|
{
|
|
|
|
Name: "local-creds",
|
|
|
|
Name: "local-creds",
|
|
|
|
Exec: runLocalCreds,
|
|
|
|
Exec: runLocalCreds,
|
|
|
|
ShortHelp: "print how to access Tailscale local API",
|
|
|
|
ShortHelp: "print how to access Tailscale local API",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
&ffcli.Command{
|
|
|
|
{
|
|
|
|
Name: "prefs",
|
|
|
|
Name: "prefs",
|
|
|
|
Exec: runPrefs,
|
|
|
|
Exec: runPrefs,
|
|
|
|
ShortHelp: "print prefs",
|
|
|
|
ShortHelp: "print prefs",
|
|
|
@ -66,7 +71,7 @@ var debugCmd = &ffcli.Command{
|
|
|
|
return fs
|
|
|
|
return fs
|
|
|
|
})(),
|
|
|
|
})(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
&ffcli.Command{
|
|
|
|
{
|
|
|
|
Name: "watch-ipn",
|
|
|
|
Name: "watch-ipn",
|
|
|
|
Exec: runWatchIPN,
|
|
|
|
Exec: runWatchIPN,
|
|
|
|
ShortHelp: "subscribe to IPN message bus",
|
|
|
|
ShortHelp: "subscribe to IPN message bus",
|
|
|
@ -245,3 +250,12 @@ func runDaemonGoroutines(ctx context.Context, args []string) error {
|
|
|
|
Stdout.Write(goroutines)
|
|
|
|
Stdout.Write(goroutines)
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func runDaemonMetrics(ctx context.Context, args []string) error {
|
|
|
|
|
|
|
|
out, err := tailscale.DaemonMetrics(ctx)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
return err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Stdout.Write(out)
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|