View RSS Feed

James' openSUSE Bash Scripting (and other things) Blog - Your Comments are Welcome!

SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2

Rating: 2 votes, 5.00 average.
SCREENSHOTS:



SysdCmd is a bash script intended to be used in openSUSE and tested with openSUSE version 12.3. I have included all of the features I feel openSUSE users will likely want in a bash script intended to help you learn how to use and work with systemd. SysdCmd will install the following standard openSUSE packages: systemd-ui, systemd-analyze and graphviz all of which will require root user access. The online document at http://paste.opensuse.org/view/download/97195318 will be downloaded as the file $HOME/Documents/systemd_service_file_document.txt. An online check will be made before these actions are taken. In addition if the online check is successful, three online documents can be read. You can disable the online check as well as the download of the three openSUSE packages, the online text file download and online reading of the three URL linked document files with settings at the top of this bash script. Same goes for using color, you can disable all color and use only black and white if you wish. Please consult and modify the top port this bash script if you wish to disable any of these functions. When a file or function is disabled, its menu option will no longer be present when you run SysdCmd. The folder at "/usr/lib/systemd/system/" is used by default for all service files to reside. When a service file is enabled, a symbolic link pointing to its actual location is created somewhere in the folder /etc/systemd/system/ or one of its sub-folders automatically for you.

systemd is a replacement for the Linux init daemon (either System V or BSD-style). It is intended to provide a better framework for expressing services' dependencies, allow more work to be done in parallel (concurrently) at system startup, and to reduce shell overhead. The name comes from the Unix convention of suffixing the names of system daemons (background processes) with the letter "d".
systemd is maintained by Lennart Poettering and Kay Sievers, with many other contributors. It is published as free software under the terms of the GNU Lesser General Public License version 2.1 or later.


FILE COMMAND HELP MENU:



systemd Configuration MENU:



systemd Document HELP MENU:



Did you know you can speed up the load times for Firefox and Chrome in KDE by just disabling "Enable Launch Feedback" in the KDE menu editor? Navigate to Internet / Web Browser / Firefox (or Chrome) and uncheck the "Enable Launch Feedback" check block. Make sure to save your changes before you close the menu editor.

systemd Speed Analyze MENU:



GRAPHIC VIEWERS of SYSTEM LOAD TIMES:

TEXT SERVICE LOADING DISPLAY:

Code:
Terminal Command: systemd-analyze blame

   877ms Software.mount
   802ms Multimedia.mount
   630ms Windows.mount
   255ms vboxdrv.service
   162ms postfix.service
   157ms Backup.mount
   156ms home.mount
   137ms systemd-vconsole-setup.service
    75ms smb.service
    59ms DataSafe.mount
    57ms cycle.service
    50ms systemd-udev-root-symlink.service
    37ms udisks2.service
    28ms dev-mqueue.mount
    27ms dev-hugepages.mount
    26ms ntp.service
    24ms xdm.service
    24ms NetworkManager.service
    23ms nmb.service
    20ms systemd-remount-fs.service
    17ms systemd-modules-load.service
    17ms rtkit-daemon.service
    16ms systemd-udev-trigger.service
    13ms avahi-daemon.service
    11ms systemd-tmpfiles-setup.service
    10ms cpufreq.service
    10ms systemd-logind.service
     8ms polkit.service
     6ms vboxweb-service.service
     6ms vboxballoonctrl-service.service
     6ms console-kit-daemon.service
     5ms vboxautostart-service.service
     4ms fbset.service
     3ms upower.service
     3ms rsyslog.service
     2ms systemd-readahead-replay.service
     2ms bluetooth.service
     2ms apcupsd.service
     2ms systemd-readahead-collect.service
     2ms proc-sys-fs-binfmt_misc.mount
     2ms rc-local.service
     2ms systemd-sysctl.service
     1ms systemd-udevd.service
     1ms var-lock.mount
     1ms sys-kernel-debug.mount
     1ms var-run.mount
     1ms sys-fs-fuse-connections.mount
     0ms console-kit-log-system-start.service
     0ms systemd-user-sessions.service

Terminal Command: systemd-analyze

Startup finished in 1803ms (kernel) + 7953ms (userspace) = 9756ms

Kernel and Boot Log MENU:




If the file called "/shutdown-log.txt" is found to be present, a menu option 5) will appear to view this file created by the debug.sh file. It appears you must manually remove this file when you are done using it.

Edit or Create Service File using KDialog (or Zenity):



Active systemd Targets Loaded:



systemd Administration System Manager:



So
, if you are running openSUSE 12.1 (or higher) and systemd is detected as being installed, you can use the SysdCmd helper bash script I have written. This bash script I call SysdCmd can be obtained from SUSE Paste. I have written the SysdCmd bash script to reside in the ~/bin folder. Select the Download option in the top right using the link shown below and select open with Kwrite or another text editor. Then save the following text into the file called sysdcmd (as in /home/username/bin/sysdcmd):

SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2

It is possible to directly download the script from SUSE Paste using the following commands (You must delete the old version of sysdcmd first should one exist). Just open up a terminal session and copy the text from any code block show here and past it after the terminal prompt and then press enter:

Code:
rm ~/bin/sysdcmd
Code:
wget -nc http://paste.opensuse.org/view/download/95655714 -O ~/bin/sysdcmd
Next, you need to mark the file sysdcmd as executable with the following command:

Code:
chmod +x ~/bin/sysdcmd
You can add all three commands above and run it as one. Just copy and paste the following command into a terminal session:

Code:
rm ~/bin/sysdcmd ; wget -nc http://paste.opensuse.org/view/download/95655714 -O ~/bin/sysdcmd ; chmod +x ~/bin/sysdcmd
To use sysdcmd run the terminal command:

Code:
sysdcmd
If you have any comments or suggestions for the bash script SysdCmd, please let me hear from you.

Thank You,

Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to Digg Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to del.icio.us Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to StumbleUpon Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to Google Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to Facebook Submit "SysdCmd - systemd Command Help/Config Editor - Version: 1.1.2" to Twitter

Updated 19-May-2013 at 14:37 by jdmcdaniel3

Categories
openSUSE Software

Comments

  1. vazhavandan's Avatar
    change systend to systemd before 3rd screen
  2. jdmcdaniel3's Avatar
    [QUOTE=vazhavandan;bt781]change systend to systemd before 3rd screen[/QUOTE]

    Got it and thank you. Its been a long weekend of coding for SysdCmd. Hopefully it will be useful to some openSUSE users.

    Thank You,
  3. vazhavandan's Avatar
    >>So, if you are running openSUSE 12.1
    Did you mean 12.3 ? Or did you mean that the script works across board from 12.1 to 12.3 ?

    I don't know if the script is supposed to work this way but:-
    It would be better if prerequisites are posted like "Oss,etc ... repos should be configured and enabled etc". If i have all the repos disabled and when i choose 'Y' for installation of "analyze","graphviz", the script doesn't exit pointing out that it couldn't install stuff..Also the script is not gnome-terminal friendly.I think since it is designed for "Konsole" where terminal background is black,this was not noticeable.
    See here :- http://paste.opensuse.org/images/13555018.png

    Overall great job thanks
  4. jdmcdaniel3's Avatar
    SysdCmd - systemd Command Help/Config Editor has been updated to Version: 1.1.0 and has four new menus adding in numerous new options and over 50 selections to chose from. If you want to become an expert at using and working with systemd, I have the starting place right here in openSUSE and it is called SysdCmd.

    Thank You,
  5. jdmcdaniel3's Avatar
    SysdCmd - systemd Command Help/Config Editor has been updated to Version: 1.1.1 with just a few changes. The configuration edit menu had a bug that caused it to edit the same file for each selection, now fixed and the addition of the HOSTNAME config file to the list. The command listing had one more duplicated command, now removed and the addition of one new command which is a bash script. As always, if you have a comment or request, I want to hear what it is.

    Thank You,
  6. jdmcdaniel3's Avatar
    SysdCmd - systemd Command Help/Config Editor has been updated to Version: 1.1.2 with a fix required to the Enable/Disable service where the Disabled would work and the Enable did not work. Changed the document menu and a very few other fixes.

    Thank You,