<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://dengxihe.com/techwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://dengxihe.com/techwiki/feed.php">
        <title>Tech Wiki linux</title>
        <description></description>
        <link>https://dengxihe.com/techwiki/</link>
        <image rdf:resource="https://dengxihe.com/techwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-25T12:36:33-07:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/audio?rev=1484789943&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/boot?rev=1524263813&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/btrfs?rev=1489004219&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/disk?rev=1484790161&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/myubuntu?rev=1484850492&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/network?rev=1505781468&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/ocfs2?rev=1484790981&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/perf?rev=1484790406&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/serial_console?rev=1505522408&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/ssh?rev=1485285754&amp;do=diff"/>
                <rdf:li rdf:resource="https://dengxihe.com/techwiki/linux/yum?rev=1486187660&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://dengxihe.com/techwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>Tech Wiki</title>
        <link>https://dengxihe.com/techwiki/</link>
        <url>https://dengxihe.com/techwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://dengxihe.com/techwiki/linux/audio?rev=1484789943&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-18T17:39:03-07:00</dc:date>
        <title>linux:audio</title>
        <link>https://dengxihe.com/techwiki/linux/audio?rev=1484789943&amp;do=diff</link>
        <description>Audio

Issues

	*  Play mp3 in command line
		*  Packages - alsa alsa-lib
		*  Only root can read the audio device - Add regular user to “audio” group
		*  Volume control - “alsamixer”, left/right, up/down to adjust the volume
		*  Play mp3 in command line - ffplay from ffmpeg, play from sox with libsox-fmt-mp3</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/boot?rev=1524263813&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2018-04-20T15:36:53-07:00</dc:date>
        <title>linux:boot</title>
        <link>https://dengxihe.com/techwiki/linux/boot?rev=1524263813&amp;do=diff</link>
        <description>Boot

Grub

	*  Grub 2 - Setting default entry 

Open /etc/default/grub and ensure this line exists:
GRUB_DEFAULT=saved

Apply the change to grub.cfg by running:
# grub2-mkconfig -o /boot/grub2/grub.cfg

Now list all possible menu entries
# grep ^menuentry /boot/grub2/grub.cfg | cut -d &quot;'&quot; -f2

Now set the desired default menu entry
# grub2-set-default &lt;menu entry title&gt;

Verify the default menu entry
# grub2-editenv list</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/btrfs?rev=1489004219&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-03-08T12:16:59-07:00</dc:date>
        <title>linux:btrfs</title>
        <link>https://dengxihe.com/techwiki/linux/btrfs?rev=1489004219&amp;do=diff</link>
        <description># mkfs.btrfs -L data /dev/sda4
# btrfs filesystem show
# mount /dev/sda4 /data
# btrfs filesystem df /data
# btrfs filesystem usage /data


add new device


# btrfs device add /dev/xvdb /
# btrfs filesystem balance /
Done, had to relocate 7 out of 7 chunks</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/disk?rev=1484790161&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-18T17:42:41-07:00</dc:date>
        <title>linux:disk</title>
        <link>https://dengxihe.com/techwiki/linux/disk?rev=1484790161&amp;do=diff</link>
        <description>Disk

Partition UUID and Label

	*  Get UUID and Label

# blkid
/dev/sda1: SEC_TYPE=&quot;msdos&quot; UUID=&quot;62AC-64E2&quot; TYPE=&quot;vfat&quot;
/dev/sda2: UUID=&quot;ebc16f0e-586d-466e-aba5-321016b401e9&quot; TYPE=&quot;ext4&quot;
/dev/sda3: UUID=&quot;9bb04b5a-e6c8-48ae-b802-4084f3943945&quot; TYPE=&quot;xfs&quot;
/dev/sda4: UUID=&quot;439969cb-2311-40e9-b1bc-6ede1bd185ef&quot; TYPE=&quot;swap&quot;
/dev/sdc1: UUID=&quot;6450978C50976398&quot; TYPE=&quot;ntfs&quot;
/dev/sdc2: UUID=&quot;fc5d0b9e-6092-410d-b000-c567be2eb940&quot; TYPE=&quot;ext4&quot;
/dev/sdb1: UUID=&quot;665d6352-b050-4702-b4f0-c6242c785127&quot; TYPE=&quot;xfs&quot;</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/myubuntu?rev=1484850492&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-19T10:28:12-07:00</dc:date>
        <title>linux:myubuntu</title>
        <link>https://dengxihe.com/techwiki/linux/myubuntu?rev=1484850492&amp;do=diff</link>
        <description>java in Ubuntu

&lt;https://launchpad.net/~webupd8team/+archive/ubuntu/java&gt; &lt;http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html&gt;

3TB Seaga HD failure


Error in /var/log/syslog
Dec 30 14:26:23 homeserver kernel: [43971969.493019] ata3.00: BMDMA stat 0x25
Dec 30 14:26:23 homeserver kernel: [43971969.494077] ata3.00: failed command: READ DMA EXT
Dec 30 14:26:23 homeserver kernel: [43971969.495077] ata3.00: cmd 25/00:00:d8:1f:6c/00:04:28:00:00/e0 tag 0 dma 524288 in
Dec 30 1…</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/network?rev=1505781468&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-09-18T17:37:48-07:00</dc:date>
        <title>linux:network</title>
        <link>https://dengxihe.com/techwiki/linux/network?rev=1505781468&amp;do=diff</link>
        <description>ip command

set static ip


# ip addr add 192.168.0.100/22 dev eth0


del static IP


# ip addr del 192.168.0.100/22 dev eth0


del all IP


# ip addr flush dev eth0


set mtu


# ip link set dev eth0 mtu 9000


create a bridge


# brctl addbr br0
# brctl addif br0 eth0
# ip addr del 192.168.0.100/24 dev eth0
# ip link set up dev br0
# ip addr add 192.168.0.100/24 dev br0
# brctl show</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/ocfs2?rev=1484790981&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-18T17:56:21-07:00</dc:date>
        <title>linux:ocfs2</title>
        <link>https://dengxihe.com/techwiki/linux/ocfs2?rev=1484790981&amp;do=diff</link>
        <description>*  Create file system
		*  Local


# mkfs.ocfs2 -M local -T [vmstore|datafiles|emails|] -L [lable] device

On OVS
# mkfs.ocfs2 -J block64 -b 4096 -L &lt;label&gt; -U &lt;uuid&gt; -T vmstore -N 32 -M local



	*  Get ocfs2 fs information
		*  Local

# tunefs.ocfs2  -Q &quot;Label: %V\nUUID: %U\nBlock size: %B bytes\nCluster size: %T bytes\nNumber of node slots: %N\nFlags: %M %H %O\n&quot;  /dev/mapper/35000cca01646b4a8 
Label: ovmstore
UUID: 1378EF40C752489C8216F0979EDC8CEB
Block size: 4096 bytes
Cluster size: 1048576…</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/perf?rev=1484790406&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-18T17:46:46-07:00</dc:date>
        <title>linux:perf</title>
        <link>https://dengxihe.com/techwiki/linux/perf?rev=1484790406&amp;do=diff</link>
        <description>Performance

	*  Enable “Uncore Frequency Scaling” in BIOS CPU power management configuration.
	*  create CPU work load

# taskset -c 0 openssl speed



	*  Check turbo boost

# turbostat
# pcm



	*  Set CPU frequency policy

# cpupower frequency-set -g performance</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/serial_console?rev=1505522408&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-09-15T17:40:08-07:00</dc:date>
        <title>linux:serial_console</title>
        <link>https://dengxihe.com/techwiki/linux/serial_console?rev=1505522408&amp;do=diff</link>
        <description>RHEL/Centos/OL 7.X

Baremetal


cat  /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=&quot;$(sed 's, release .*$,,g' /etc/system-release)&quot;
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
#GRUB_TERMINAL_OUTPUT=&quot;console&quot;
GRUB_TERMINAL=&quot;console serial&quot;
GRUB_SERIAL_COMMAND=&quot;serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1&quot;
GRUB_CMDLINE_LINUX=&quot;crashkernel=auto console=tty1 console=ttyS0,115200&quot;
GRUB_DISABLE_RECOVERY=&quot;true&quot;
GRUB_GFXPAYLOAD_LINUX=text</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/ssh?rev=1485285754&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-01-24T11:22:34-07:00</dc:date>
        <title>linux:ssh</title>
        <link>https://dengxihe.com/techwiki/linux/ssh?rev=1485285754&amp;do=diff</link>
        <description>SSH

generate key


$ ssh-keygen -t rsa -b 4096


ssh agent

If your private key is encrypted with a passphrase(when you generate it by ssh-keygen), the passphrase must be entered every time you attempt to connect to an SSH server using public-key authentication.</description>
    </item>
    <item rdf:about="https://dengxihe.com/techwiki/linux/yum?rev=1486187660&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2017-02-03T21:54:20-07:00</dc:date>
        <title>linux:yum</title>
        <link>https://dengxihe.com/techwiki/linux/yum?rev=1486187660&amp;do=diff</link>
        <description>Yum download packages


 # yum install yum-utils
 # yumdownloader &lt;packagename&gt;
 # yumdownloader --source &lt;packagename&gt;


Yum group install

OL6


# yum grouplist
Setting up Group Process
ol6_latest/group                                                                                                                                                                             | 1.1 MB     00:01     
Installed Groups:
   E-mail server
Available Groups:
   Additional Development
   Backup Client
   …</description>
    </item>
</rdf:RDF>
