Re: [systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-24 Thread Lennart Poettering
On Thu, 22.11.12 13:45, Colin Guthrie (gm...@colin.guthr.ie) wrote:

> >> When I see
> >> systemctl status ...
> >> systemd-journalctl
> 
> This is now just called "journalctl" since systemd v45
> 
> There is also "loginctl" (which used to be called "systemd-loginctl".
> 
> >> systemd-analyze ...
> 
> This is quite a specialist tool, not really used on a day-to-day basis
> by admins.
> 
> >> systemd-cgls
> 
> As is this.
> 
> >> it looks like a messy version of what git does (git ls, git add, git
> >> clone, etc).
> >> Git started that way too, and eventually brought sanity to the
> >> git-world with the top-level cli-ui as we have today.
> >>
> >> I suggest systemd ought do the same, preferably sooner rather than
> >> later (it is still early days for many distros, eg such as Debian
> >> which I am on).
> 
> I don't think this really applies here. The day-to-day commands are
> really systemctl, journalctl and loginctl (although the last one is
> likely not often used).
> 
> The other commands are really not often used which is very unlike git
> when I regularly use the different commands.
> 
> So I don't think this kind of wrapper command is really needed IMO.

Yes, I agree with Colin here. We currently have the following policy:

a) If the user never really calls it directly, it belongs in
/usr/lib/systemd/ and is prefixed with "systemd-", so that it appears
nicely in "ps" if it is running.

b) If it is a more exotic command but sometimes invoked by the user, and
required in early boot, it is prefixed with "systemd-", and stored in
$rootbindir.

c) If it is a more exotic command but sometimes invoked by the user, and
only need during runtime or late boot, it is prefixed with "systemd-",
and stored in $bindir.

d) If it a frequently used command, it is not prefixed with "systemd-"
and stored in $rootbindir. These commands are usually suffixed with
"ctl" or "adm".

So, in summary, we have three different places to store binaries in and
try to have a simpler naming scheme for the most frequently used
commands. This all is kinda incompatible with the "git" scheme of having
a single frontend command you invoke. (Well, or at least not obviously
compatible...)

I am not convinced that following the git scheme in this regard makes
sense...

(We get a lot of inspiration from git otherwise, such as autopaging, or
the date syntax for --until= and --from= in journalctl, but we should
only pick things where we are convinced that they make sense for us, and
not blindly copy the whole scheme...)

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-23 Thread Matthew Monaco
On 11/23/2012 02:27 AM, Henrik Grindal Bakken wrote:
> Colin Guthrie  writes:
> 
>> I don't think this really applies here. The day-to-day commands are
>> really systemctl, journalctl and loginctl (although the last one is
>> likely not often used).
> 
> I think it's a bit annoying that systemctl is
> a) so long, and
> b) tab-completes poorly
> 
> 'sc'?
> 
> 

I think this is easy to personalize, and doesn't need to be done upstream at
this point.

I have

sd  = systemctl --system
ud  = systemctl --user
log = journalctl

loginctl hasn't bothered me yet.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-23 Thread Henrik Grindal Bakken
Colin Guthrie  writes:

> I don't think this really applies here. The day-to-day commands are
> really systemctl, journalctl and loginctl (although the last one is
> likely not often used).

I think it's a bit annoying that systemctl is
a) so long, and
b) tab-completes poorly

'sc'?


-- 
Henrik Grindal Bakken 
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963  02AF 9236 D25A 8D43 6E52

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-22 Thread Mantas Mikulėnas
On Thu, Nov 22, 2012 at 3:45 PM, Colin Guthrie  wrote:
> I don't think this really applies here. The day-to-day commands are
> really systemctl, journalctl and loginctl (although the last one is
> likely not often used).
>
> The other commands are really not often used which is very unlike git
> when I regularly use the different commands.

It's actually very much *like* Git, which has both day-to-day commands
(the "porcelain") as well as advanced admin and low-level manipulation
commands ("plumbing") under the same 'wrapper'. How often do you use
"git symbolic-ref"?

Although I don't have a strong opinion on "journalctl" vs "syd
journal" and the like... consistency is good, but users already know
the existing commands.

Maybe `syd` should first be written as a plain 'sh' script that wraps
the existing commands, just to see which one users prefer.

--
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-22 Thread Colin Guthrie
'Twas brillig, and Zenaan Harkness at 22/11/12 13:30 did gyre and gimble:
> -- Forwarded message --
> From: Tollef Fog Heen 
> Date: Thu, 22 Nov 2012 14:12:16 +0100
> Subject: Re: WISHLIST: systemd git-like CLI/ui/command interface
> To: Zenaan Harkness 
> 
> ]] Zenaan Harkness
> 
> Hi,
> 
>> Not sure where to send this. I emailed what might be LP.
>> Pls use as appropriate.
>>
>> When I see
>> systemctl status ...
>> systemd-journalctl

This is now just called "journalctl" since systemd v45

There is also "loginctl" (which used to be called "systemd-loginctl".

>> systemd-analyze ...

This is quite a specialist tool, not really used on a day-to-day basis
by admins.

>> systemd-cgls

As is this.

>> it looks like a messy version of what git does (git ls, git add, git
>> clone, etc).
>> Git started that way too, and eventually brought sanity to the
>> git-world with the top-level cli-ui as we have today.
>>
>> I suggest systemd ought do the same, preferably sooner rather than
>> later (it is still early days for many distros, eg such as Debian
>> which I am on).

I don't think this really applies here. The day-to-day commands are
really systemctl, journalctl and loginctl (although the last one is
likely not often used).

The other commands are really not often used which is very unlike git
when I regularly use the different commands.

So I don't think this kind of wrapper command is really needed IMO.

Col



-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] WISHLIST: systemd git-like CLI/ui/command interface

2012-11-22 Thread Zenaan Harkness
-- Forwarded message --
From: Tollef Fog Heen 
Date: Thu, 22 Nov 2012 14:12:16 +0100
Subject: Re: WISHLIST: systemd git-like CLI/ui/command interface
To: Zenaan Harkness 

]] Zenaan Harkness

Hi,

> Not sure where to send this. I emailed what might be LP.
> Pls use as appropriate.
>
> When I see
> systemctl status ...
> systemd-journalctl
> systemd-analyze ...
> systemd-cgls
>
> it looks like a messy version of what git does (git ls, git add, git
> clone, etc).
> Git started that way too, and eventually brought sanity to the
> git-world with the top-level cli-ui as we have today.
>
> I suggest systemd ought do the same, preferably sooner rather than
> later (it is still early days for many distros, eg such as Debian
> which I am on).

If you want this, please take it upstream, to the
systemd-devel@lists.freedesktop.org mailing list.  It's not something
I'll implement in the Debian package.

Cheers,
-- 
Tollef Fog Heen
UNIX is user friendly, it's just picky about who its friends are


...
So, I propose, just like git has a clean front-end, the following
cli/ui as a similarly clean front end for systemd:
syd status ...
syd jctl ...  # jctl might be a "git alias" of syd journalctl...
syd cgls
syd halt|reboot|restart|start|stop
syd cgtop
syd nspawn
... and so on and so on
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel