Proposed Forum Posting modification to guide including essential info

# lsb_release -d
Description:    openSUSE 12.2 (x86_64)
# uname -r
3.4.28-2.20-default

Problem:
One of the most common issues providing help is that the OP may not post relevant information about his system.

Proposal:
A shortlist of commands that will quickly provide standard information about the system and possibly additional information leading to a solution. Also, new Users may gain some empowerment just by executing some command lines that actually provide useful information.

Additional:
Although there is some advancing technology in Unstructured Data Analysis and NLP (Natural Language Processing), if openSUSE/SUSE has visions of mining the data, additional steps could be taken to store data in specific fields for structured data analysis. If anyone is already working on this kind of roadmap, this should be brought to that person’s attention immediately for input and co-ordination.
**
Additional implementation recommendation:**
If this proposal moves forward and is not implemented with structured data analysis in mind, I highly recommend that these standard commands to display system setup and configuration should be “suggested” as comment in the Input Box and not as a separate FAQ for each forum. This would unmistakeably bring to the attention of the poster what information would be required/recommended. I also suggest a reminder for the User to consider again Forum might be most appropriate, and can refer to the Forum Posting FAQ.

Starting recommmended CLI commands

Required:
This post starts off with these commands (see top)


# Displays kernel version
**uname -r **
# Displays OS, version and platform
**lsb_release -d   **                                         

Optional:


# Display partitions, mount points
**df **
# Displays free and used memory
**free -m **
# Replacing ifconfig, displays NIC network info
**ip addr    **                                                       
# For 12.2 and earlier, displays last 100 lines of the syslog
**tail -n 100 /var/log/messages    **                   
# For 12.3 and later the "systemctl status" automatically displays the  error, error location and syslog entries. See Tony's systemd page for  use and explanation
**systemctl status <unitname>.<unittype> **.

**Missing **(I haven’t yet found a command)
Display currently running Desktop and version
(Because this is not a system setting, is specific to current User)

I propose and am willing to start a wiki page for elementary steps in troubleshooting common issues. This can support or replace the current method which seems to be to create a sticky post. My current very early draft is at
https://en.opensuse.org/User:tsu2/systemd-1
You’ll notice some links are not completed. Also, because of the extreme format and theme limitations of the default template it’s hard to modify for better visual impact to clarify and explain without words. Am hoping to make the document smaller after some review. BTW - like any other User wiki page it’s editable by <anyone> and I do invite people to hack away at it or if you feel shy about hacking directly send me something and I’ll make any improvements.

I also haven’t embedded an example for what a “systemctl status” output would look like, I can include an error from my own 12.2 system and update later with a better output from a 12.3 system.

Lastly,
A side benefit of listing these commands goes beyond Forums Post use, they may even be useful for Users to understand their machines better on their own.

TSU

Awesome job

Random Commands collected in these forums and other places ,might help you in your effort.

DNS server(s)

$grep -v ‘^#’ /etc/resolv.conf

Hard Disk and file systems

$ sudo /sbin/fdisk -l

$cat /etc/fstab

$df

$free

System info
uname <==can print system info

kernel in use
$uname -r

All info
$uname -a

**** List of PLAYBACK Hardware Devices ****
$aplay -l
$aplay -L

Hardware info
sudo /sbin/lspci -v

usb info
$lsusb

$udisks --monitor

$dmesg|tail

Ethernet
/sbin/lspci -nnk | grep -iA2 net

Graphics
/sbin/lspci -v | grep -i display

OS info
$cat /etc/os-release

openSUSE version
$cat /etc/SuSE-release

kernel info
$grep NO_KMS_IN_INITRD /etc/sysconfig/kernel

Nvidia driver version
$rpm -qa | grep nvidia

cpu info
cat /proc/cpuinfo
dmesg | grep -i proces

New Launcher in GNOME Shell
gnome-desktop-item-edit “$(date).desktop”

Directories that use most space
Just for the next time someone wants to find out which directories are using most of the space on a partition:

du -x / | sort -n | tail -n 100

Failsafe boot params
splash=silent nomodeset x11failsafe

Recursive File removal
$ sudo rm -f -r /home/mantis/.avidemux

padsp - PulseAudio OSS Wrapper
Can run Oss using pulse
padsp [options] PROGRAM [ARGUMENTS …]

Change run level :
use Ctrl+Alt+F1 followed by Ctrl+Alt+F7.

Who owns process/See who owns the apper process(es).
$ps -ef | grep apper

Restart nautilus
$nautilus -q

Check ports
$netstat -tulpn
ident server that listens on TCP port 113
netstat -tulpn | grep 113

Kill gconfd

killall gconfd-2

Add audio to video
#ffmpeg -i xyz.webm -i abc.mp3 -shortest -c copy output.avi

Systemd

Status of all services
sudo systemctl --full --type=service

status of network service
sudo systemctl status network.service

Restart network service
sudo systemctl restart network.service

shutdown system
sudo /sbin/shutdown -r now

Zypper comands
sudo zypper dup --download “in-advance”
sudo zypper clean --all
sudo zypper clean
sudo zypper ref
sudo zypper ref -f
sudo zypper shell
sudo zypper lr --export backups/repos/foo.repo
sudo zypper ar backups/repos/foo.repo #import
sudo rpmdb --rebuilddb
sudo zypper ar -f -n packman Index of /suse/openSUSE_Tumbleweed/ packman
zypper refresh -fdb This forces a complete refresh and rebuild of the database, including a forced download of raw metadata.

Rebuild RPM database:

rpm --rebuilddb

checks mplayer

rpm -qa | grep mplayer

sudo zypper modifyrepo --all --disable
sudo zypper clean --all
sudo zypper clean
sudo zypper ref
sudo zypper ref -f
sudo zypper dup --download “in-advance”

sudo zypper mr --disable --all
sudo zypper clean --all
sudo zypper ref -f
sudo zypper dup --download “in-advance”

Installed packges
#rpm -qa --last
#rpm -qa --last | less
#rpm -qa --last > myrpms.txt

Packages available on system
zypper se -s -r 4 | wc -l ## available packages from repo 4 (packman)
zypper se -si -r packman | wc -l ## installed (-si) packages from repo 4 (packman)
140

vazhavandan

Good suggestions

But many of the tools we’ve used up until now have been or are supposed to be superceded by superior systemd tools.

Any tool which uses the following should be double-checked against systemd
Init, ps, anything in /sbin, lsusb, udev, udisks, fstab, reading directly from files in locations like /proc

A nunber of tradional tools have been superceded by ip (iptools2) including
Ifconfig, netstat

The challenges seem to be

  1. Keep initial posting guide as short and simple as possible
  2. Compile a list of recommended tools useful into the future. Although traditional tools will likely still work (mostly, eg using ps to determine parent process is unreliable but best available until systemd), we should recommend best tools when options exist to get the same info.

TSU

You can also use zypper:

# zypper tos
openSUSE-12.2-x86_64

You can find your current DE with command “env”:

env | grep DESKTOP_SESSION
DESKTOP_SESSION=kde-plasma

Unless you don’t want the versions of the RPMs (zypper or rpm) the versions can be found with:

 ##  Which desktop version am I running?  ##

KDE:
kde4-config -v

GNOME:
gnome-session --version

XFCE4:
xfce4-about -V

All suggestions are good, even if they overlap or repeat prior postings, the objective is to compile an overly long list, then eventually whittle down to recommended few.

Too bad, so far there doesn’t seem to be a universal command that returns the desktop installed with version… Maybe a compound query needs to be created, but I’d think that should be avoided if possible.

Since “systemd status” is likely one of the most important commands anyone should use when posting about any problem on the local system starting with 12.2 (not usually anything involving talking between computers), I’ve now created an alternative version.

These temporary URLs are the two versions (Once a decision is made which to use if either is to be used, one or both URLs won’t be valid)

  1. This first version is more linear in description
    https://en.opensuse.org/User:tsu2/systemd-1

  2. This second version is circular, it first displays the end result we want, then gives necessary foundation info, then finally lists the actual steps a for getting the example output
    https://en.opensuse.org/User:tsu2/systemd-2

As always, if anyone sees an improvement or an outright error can be fixed, go hack away at it, you don’t need any permission to do so. If something isn’t clear, go ahead and write on the page “This is clear as mud!” and if you have a better idea how to reword edit the page directly. If something gets messed up really badly, don’t worry about it, I have the original markup separately.

TSU

That is only logical, because from the “what is installed” point of view, a desktop is only a bunch of installed packages. There is nothing peculira that defines what is a desktop in all the packages. And of course you can have three or four or more desktops installed. Thus the question “a universal command that returns the desktop installed with version” is badly formulated and thus can not have a solution.

:slight_smile:
OK, assuming if the User is invited to submit his information immediately after initial install, I’d feel fairly safe that over 99.99% of all installs will have only one Desktop installed, and it’s likely the User’s preferred Desktop.

A desktop “only a bunch of installed packages”? Someone might say otherwise, Nevertheless, it’s useful to know what Desktop the User has installed and assumed to be running.

A slight modification to my earlier links, I’ve partially resolved some issues with my use of the openSUSE wiki, for the next few days I’ll leave up both versions of my proposed instructions to use “systemctl status” for posting system-related info, which required me to change the URL of one of the versions. These are the two
https://en.opensuse.org/User:Tsu2/systemd-3
https://en.opensuse.org/User:Tsu2/systemd-2

If anyone has an opinion on the two, I’ll choose one or the other within a week and do final polishing.

TSU

You might be interested in openSLAVE https://forums.opensuse.org/blogs/jdmcdaniel3/s-l-v-e-suse-logfile-automated-viewer-engine-version-2-61-70/

Yes,
But I’d hesitate for a moment until Jim can verify S.L.A.V.E still works or is updated to work with the changes happening now integrating systemd. Although many custom commands are supposed to continue to work, I’m nevertheless noticing that might not always be the case if legacy binaries and system trees are removed entirely (and replaced with more efficient systemd Units).

The only commands which are guaranteed to work moving forward are the new commands and tools like systemd and iptools2.

TSU

He put in a comment on “26-Jan-2013” saying that he has updated stuff. you might want to read through the script

I’ve found that

'zypper se -t pattern | grep i\ '

(mind the space char after the backslash) helps in some cases. F.e. where people do install make, gcc, but not the kernel sources, when asked to install the Kernel Development Pattern. As a post-install question it’s an easy way to see which desktop was chosen.