https://wiki.archlinux.org/api.php?action=feedcontributions&user=Randen&feedformat=atom
ArchWiki - User contributions [en]
2024-03-29T13:37:18Z
User contributions
MediaWiki 1.41.0
https://wiki.archlinux.org/index.php?title=User:Randen/FFmpeg&diff=708808
User:Randen/FFmpeg
2022-01-06T17:06:54Z
<p>Randen: Populate the page with some basic commands that I use occasionally</p>
<hr />
<div>== Cool Commands ==<br />
<br />
Save a live stream to disk<br />
{{ic|ffmpeg -i "http://example.com/some/file.m3u8" -c copy filename.mp4}}<br />
<br />
Make a vod from an existing video<br />
{{bc|ffmpeg -i file.mp4 -f hls \<br />
-hls_time 2 \<br />
-hls_playlist_type vod \<br />
-hls_flags independent_segments \<br />
-hls_segment_type mpegts \<br />
-hls_segment_filename %v/seg-%03d.ts \<br />
-master_pl_name master.m3u8 \<br />
%v/index.m3u8}}<br />
<br />
Make a vod from an existing video and resize into multiple resolutions<br />
{{bc|1=ffmpeg -i file.mp4 \ <br />
-filter_complex \<br />
"[0:v]split=3[v1][v2][v3]; \<br />
[v1]copy[v1out]; [v2]scale=w=1280:h=720[v2out]; [v3]scale=w=640:h=360[v3out]" \<br />
-map [v1out] -c:v:0 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:0 5M -maxrate:v:0 5M -minrate:v:0 5M -bufsize:v:0 10M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \<br />
-map [v2out] -c:v:1 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:1 3M -maxrate:v:1 3M -minrate:v:1 3M -bufsize:v:1 3M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \<br />
-map [v3out] -c:v:2 libx264 -x264-params "nal-hrd=cbr:force-cfr=1" -b:v:2 1M -maxrate:v:2 1M -minrate:v:2 1M -bufsize:v:2 1M -preset slow -g 48 -sc_threshold 0 -keyint_min 48 \<br />
-map a:0 -c:a:0 aac -b:a:0 96k -ac 2 \<br />
-map a:0 -c:a:1 aac -b:a:1 96k -ac 2 \<br />
-map a:0 -c:a:2 aac -b:a:2 48k -ac 2 \<br />
-f hls \<br />
-hls_time 2 \<br />
-hls_playlist_type vod \<br />
-hls_flags independent_segments \<br />
-hls_segment_type mpegts \<br />
-hls_segment_filename %v/seg-%03d.ts \<br />
-master_pl_name master.m3u8 \<br />
-var_stream_map "v:0,a:0,name:1080p v:1,a:1,name:720p v:2,a:2,name:480p" %v/index.m3u8}}<br />
<br />
Remux an mkv file into an mp4 file and remove subtitle track<br />
{{ic|ffmpeg -i file.mkv -y -map 0 -c:v copy -c:a aac -sn out.mp4}}</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/sandbox&diff=708537
User:Randen/sandbox
2022-01-03T17:41:56Z
<p>Randen: Add entries for tcpdump and lsof</p>
<hr />
<div>== My Sandbox ==<br />
<br />
* [[User:Randen/ipxe|ipxe]] - Some notes about ipxe<br />
* [[User:Randen/qemu|System emulation]] - Trying to use QEMU without libvirt<br />
* [[User:Randen/namespaces|Linux Namespaces]] - Some notes about namespaces<br />
* [[User:Randen/sysfs|Linux sysfs]] - Some notes about sysfs<br />
* [[User:Randen/FFmpeg|FFmpeg video converter]] - FFmpeg tips and tricks<br />
* [[User:Randen/Psuedo_file_system]]<br />
* [[User:Randen/lsof|lsof]] - List of files<br />
* [[User:Randen/tcpdump|tcpdump]] - Get packets</div>
Randen
https://wiki.archlinux.org/index.php?title=Procfs&diff=708485
Procfs
2022-01-02T23:52:07Z
<p>Randen: Create a see also section and add some links</p>
<hr />
<div>[[Category:Pseudo file systems]]<br />
{{Lowercase title}}<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
The proc file system, also called [[Wikipedia:procfs|procfs]], is a psuedo file system that is usually mounted at {{ic|/proc}} and contains information about the running system:<br />
<br />
* Processes, the most prominent use<br />
* Kernel information and [[sysctl|parameters]]<br />
* System metrics, such as CPU usage<br />
<br />
== Content ==<br />
<br />
=== Kernel & system information ===<br />
<br />
There are many files under {{ic|/proc}} which provide a lot of information about the system as well as the kernel. There are too many to cover them all here, but some of them are listed below with brief information about what they are.<br />
<br />
* {{ic|/proc/cpuinfo}} - informations about CPU<br />
* {{ic|/proc/meminfo}} - information about the physical memory<br />
* {{ic|/proc/vmstats}} - information about the virtual memory<br />
* {{ic|proc/mounts}} - information about the mounts([[mount]])<br />
* {{ic|/proc/filesystems}} - information about filesystems that have been compiled into the kernel and whose kernel modules are currently loaded<br />
* {{ic|/proc/uptime}} - current system uptime<br />
* {{ic|/proc/cmdline}} - kernel command line<br />
<br />
=== Processes ===<br />
<br />
Inside {{ic|/proc/<pid>}} is stored information about every process currently running.<br />
Below is an example showing some of the PIDs currently running<br />
{{hc|$ ls -l /proc|<br />
total 0<br />
dr-xr-xr-x 9 root root 0 Sep 8 18:17 1<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 10<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 11<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 12<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 124<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 125<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 127<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 128<br />
...<br />
}}<br />
<br />
Lets take for example pid 1057 and see what's inside<br />
{{hc|$ ls -l /proc/1057|<br />
total 0<br />
dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup<br />
--w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 io<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps<br />
-rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem<br />
...<br />
}}<br />
<br />
Some of the fields:<br />
* '''cmdline''' - arguments used to start program<br />
* '''cwd''' - current working directory for the process<br />
* '''environ''' - environment variables inside the process<br />
* '''fd/''' - directory containing open file descriptors for the process<br />
* '''exe''' - symbolic link to process executable<br />
* '''maps''' - memory mapping of the process<br />
* '''mem''' - virtual memory of the process<br />
<br />
== Usage ==<br />
<br />
To read from proc file, we can use '''cat''': {{ic|cat /proc/cmdline}} (run as the regular user).<br />
To write to the file, we can use '''echo''': {{ic|echo 1 > /proc/sys/kernel/sysrq}} (run as the root user).<br />
<br />
== See also ==<br />
* {{man|5|proc}}<br />
* [https://www.kernel.org/doc/html/latest/filesystems/proc.html Kernel documentation of procfs]<br />
* [[Wikipedia:Procfs]]</div>
Randen
https://wiki.archlinux.org/index.php?title=Procfs&diff=708484
Procfs
2022-01-02T23:47:40Z
<p>Randen: Update styling to use ic template</p>
<hr />
<div>[[Category:Pseudo file systems]]<br />
{{Lowercase title}}<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
The proc file system, also called [[Wikipedia:procfs|procfs]], is a psuedo file system that is usually mounted at {{ic|/proc}} and contains information about the running system:<br />
<br />
* Processes, the most prominent use<br />
* Kernel information and [[sysctl|parameters]]<br />
* System metrics, such as CPU usage<br />
<br />
Also see {{man|5|proc}}.<br />
<br />
== Content ==<br />
<br />
=== Kernel & system information ===<br />
<br />
There are many files under {{ic|/proc}} which provide a lot of information about the system as well as the kernel. There are too many to cover them all here, but some of them are listed below with brief information about what they are.<br />
<br />
* {{ic|/proc/cpuinfo}} - informations about CPU<br />
* {{ic|/proc/meminfo}} - information about the physical memory<br />
* {{ic|/proc/vmstats}} - information about the virtual memory<br />
* {{ic|proc/mounts}} - information about the mounts([[mount]])<br />
* {{ic|/proc/filesystems}} - information about filesystems that have been compiled into the kernel and whose kernel modules are currently loaded<br />
* {{ic|/proc/uptime}} - current system uptime<br />
* {{ic|/proc/cmdline}} - kernel command line<br />
<br />
=== Processes ===<br />
<br />
Inside {{ic|/proc/<pid>}} is stored information about every process currently running.<br />
Below is an example showing some of the PIDs currently running<br />
{{hc|$ ls -l /proc|<br />
total 0<br />
dr-xr-xr-x 9 root root 0 Sep 8 18:17 1<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 10<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 11<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 12<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 124<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 125<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 127<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 128<br />
...<br />
}}<br />
<br />
Lets take for example pid 1057 and see what's inside<br />
{{hc|$ ls -l /proc/1057|<br />
total 0<br />
dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup<br />
--w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 io<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps<br />
-rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem<br />
...<br />
}}<br />
<br />
Some of the fields:<br />
* '''cmdline''' - arguments used to start program<br />
* '''cwd''' - current working directory for the process<br />
* '''environ''' - environment variables inside the process<br />
* '''fd/''' - directory containing open file descriptors for the process<br />
* '''exe''' - symbolic link to process executable<br />
* '''maps''' - memory mapping of the process<br />
* '''mem''' - virtual memory of the process<br />
<br />
== Usage ==<br />
<br />
To read from proc file, we can use '''cat''': {{ic|cat /proc/cmdline}} (run as the regular user).<br />
To write to the file, we can use '''echo''': {{ic|echo 1 > /proc/sys/kernel/sysrq}} (run as the root user).</div>
Randen
https://wiki.archlinux.org/index.php?title=Procfs&diff=708482
Procfs
2022-01-02T23:27:08Z
<p>Randen: Be more specific about what active file systems means/* Content */</p>
<hr />
<div>[[Category:Pseudo file systems]]<br />
{{Lowercase title}}<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
The proc file system, also called [[Wikipedia:procfs|procfs]], is a psuedo file system that is usually mounted at {{ic|/proc}} and contains information about the running system:<br />
<br />
* Processes, the most prominent use<br />
* Kernel information and [[sysctl|parameters]]<br />
* System metrics, such as CPU usage<br />
<br />
Also see {{man|5|proc}}.<br />
<br />
== Content ==<br />
<br />
=== Kernel & system information ===<br />
<br />
There are many files under /proc which provide a lot of information about the system as well as the kernel. There are too many to cover them all here, but some of them are listed below with brief information about what they are.<br />
<br />
* '''/proc/cpuinfo''' - informations about CPU<br />
* '''/proc/meminfo''' - information about the physical memory<br />
* '''/proc/vmstats''' - information about the virtual memory<br />
* '''/proc/mounts''' - information about the mounts([[mount]])<br />
* '''/proc/filesystems''' - information about filesystems that have been compiled into the kernel and whose kernel modules are currently loaded<br />
* '''/proc/uptime''' - current system uptime<br />
* '''/proc/cmdline''' - kernel command line<br />
<br />
=== Processes ===<br />
<br />
Inside '''/proc/<pid>''' is stored information about every process currently running.<br />
Below is an example showing some of the PIDs currently running<br />
{{hc|$ ls -l /proc|<br />
total 0<br />
dr-xr-xr-x 9 root root 0 Sep 8 18:17 1<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 10<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 11<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 12<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 124<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 125<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 127<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 128<br />
...<br />
}}<br />
<br />
Lets take for example pid 1057 and see what's inside<br />
{{hc|$ ls -l /proc/1057|<br />
total 0<br />
dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup<br />
--w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 io<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps<br />
-rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem<br />
...<br />
}}<br />
<br />
Some of the fields:<br />
* '''cmdline''' - arguments used to start program<br />
* '''cwd''' - current working directory for the process<br />
* '''environ''' - environment variables inside the process<br />
* '''fd/''' - directory containing open file descriptors for the process<br />
* '''exe''' - symbolic link to process executable<br />
* '''maps''' - memory mapping of the process<br />
* '''mem''' - virtual memory of the process<br />
<br />
== Usage ==<br />
<br />
To read from proc file, we can use '''cat''': {{ic|cat /proc/cmdline}} (run as the regular user).<br />
To write to the file, we can use '''echo''': {{ic|echo 1 > /proc/sys/kernel/sysrq}} (run as the root user).</div>
Randen
https://wiki.archlinux.org/index.php?title=Procfs&diff=708478
Procfs
2022-01-02T23:10:57Z
<p>Randen: Add information to lead section</p>
<hr />
<div>[[Category:Pseudo file systems]]<br />
{{Lowercase title}}<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
The proc file system, also called [[Wikipedia:procfs|procfs]], is a psuedo file system that is usually mounted at {{ic|/proc}} and contains information about the running system:<br />
<br />
* Processes, the most prominent use<br />
* Kernel information and [[sysctl|parameters]]<br />
* System metrics, such as CPU usage<br />
<br />
Also see {{man|5|proc}}.<br />
<br />
== Content ==<br />
<br />
=== Kernel & system information ===<br />
<br />
There are many files under /proc which provide a lot of information about the system as well as the kernel. There are too many to cover them all here, but some of them are listed below with brief information about what they are.<br />
<br />
* '''/proc/cpuinfo''' - informations about CPU<br />
* '''/proc/meminfo''' - information about the physical memory<br />
* '''/proc/vmstats''' - information about the virtual memory<br />
* '''/proc/mounts''' - information about the mounts([[mount]])<br />
* '''/proc/filesystems''' - information about active filesystems<br />
* '''/proc/uptime''' - current system uptime<br />
* '''/proc/cmdline''' - kernel command line<br />
<br />
=== Processes ===<br />
<br />
Inside '''/proc/<pid>''' is stored information about every process currently running.<br />
Below is an example showing some of the PIDs currently running<br />
{{hc|$ ls -l /proc|<br />
total 0<br />
dr-xr-xr-x 9 root root 0 Sep 8 18:17 1<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 10<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 11<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 12<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 124<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 125<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 127<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 128<br />
...<br />
}}<br />
<br />
Lets take for example pid 1057 and see what's inside<br />
{{hc|$ ls -l /proc/1057|<br />
total 0<br />
dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup<br />
--w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 io<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps<br />
-rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem<br />
...<br />
}}<br />
<br />
Some of the fields:<br />
* '''cmdline''' - arguments used to start program<br />
* '''cwd''' - current working directory for the process<br />
* '''environ''' - environment variables inside the process<br />
* '''fd/''' - directory containing open file descriptors for the process<br />
* '''exe''' - symbolic link to process executable<br />
* '''maps''' - memory mapping of the process<br />
* '''mem''' - virtual memory of the process<br />
<br />
== Usage ==<br />
<br />
To read from proc file, we can use '''cat''': {{ic|cat /proc/cmdline}} (run as the regular user).<br />
To write to the file, we can use '''echo''': {{ic|echo 1 > /proc/sys/kernel/sysrq}} (run as the root user).</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/Psuedo_file_system&diff=708477
User:Randen/Psuedo file system
2022-01-02T23:06:57Z
<p>Randen: Create page with brief lead section</p>
<hr />
<div>A psuedo file system is a special file system in Unix-like platforms that serves as an interface to non-file objects as if they were regular files. Hence, one may use the usual system calls that would apply to regular files and directories to access the non-file objects.<br />
<br />
==Examples==<br />
* [[procfs]]<br />
* [[sysfs]]</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/sandbox&diff=708463
User:Randen/sandbox
2022-01-02T21:07:28Z
<p>Randen: Add entry for psuedo file systems/* My Sandbox */</p>
<hr />
<div>== My Sandbox ==<br />
<br />
* [[User:Randen/ipxe|ipxe]] - Some notes about ipxe<br />
* [[User:Randen/qemu|System emulation]] - Trying to use QEMU without libvirt<br />
* [[User:Randen/namespaces|Linux Namespaces]] - Some notes about namespaces<br />
* [[User:Randen/sysfs|Linux sysfs]] - Some notes about sysfs<br />
* [[User:Randen/FFmpeg|FFmpeg video converter]] - FFmpeg tips and tricks<br />
* [[User:Randen/Psuedo_file_system]]</div>
Randen
https://wiki.archlinux.org/index.php?title=Procfs&diff=708462
Procfs
2022-01-02T21:03:08Z
<p>Randen: Fix broken category tag</p>
<hr />
<div>[[Category:Pseudo file systems]]<br />
{{Lowercase title}}<br />
{{Style|Use [[Template:ic]].}}<br />
<br />
The proc filesystem, also called [[Wikipedia:procfs|procfs]], is usually mounted at {{ic|/proc}} and contains information about the running system:<br />
<br />
* Processes, the most prominent use<br />
* Kernel information and [[sysctl|parameters]]<br />
* System metrics, such as CPU usage<br />
<br />
Also see {{man|5|proc}}.<br />
<br />
== Content ==<br />
<br />
=== Kernel & system information ===<br />
<br />
There are many files under /proc which provide a lot of information about the system as well as the kernel. There are too many to cover them all here, but some of them are listed below with brief information about what they are.<br />
<br />
* '''/proc/cpuinfo''' - informations about CPU<br />
* '''/proc/meminfo''' - information about the physical memory<br />
* '''/proc/vmstats''' - information about the virtual memory<br />
* '''/proc/mounts''' - information about the mounts([[mount]])<br />
* '''/proc/filesystems''' - information about active filesystems<br />
* '''/proc/uptime''' - current system uptime<br />
* '''/proc/cmdline''' - kernel command line<br />
<br />
=== Processes ===<br />
<br />
Inside '''/proc/<pid>''' is stored information about every process currently running.<br />
Below is an example showing some of the PIDs currently running<br />
{{hc|$ ls -l /proc|<br />
total 0<br />
dr-xr-xr-x 9 root root 0 Sep 8 18:17 1<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 10<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1057<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 8 18:18 1077<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1087<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 11<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1103<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1107<br />
dr-xr-xr-x 9 daemonx daemonx 0 Sep 9 03:02 1159<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 12<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 124<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 125<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 127<br />
dr-xr-xr-x 9 root root 0 Sep 9 03:02 128<br />
...<br />
}}<br />
<br />
Lets take for example pid 1057 and see what's inside<br />
{{hc|$ ls -l /proc/1057|<br />
total 0<br />
dr-xr-xr-x 2 daemonx daemonx 0 Sep 9 03:12 attr<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 autogroup<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 auxv<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cgroup<br />
--w------- 1 daemonx daemonx 0 Sep 9 03:12 clear_refs<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cmdline<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 comm<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 coredump_filter<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 cpuset<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 cwd -> /home/daemonx<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 environ<br />
lrwxrwxrwx 1 daemonx daemonx 0 Sep 9 03:12 exe -> /usr/lib/gvfsd-metadata<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fd<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 fdinfo<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 gid_map<br />
-r-------- 1 daemonx daemonx 0 Sep 9 03:12 io<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 latency<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 limits<br />
-rw-r--r-- 1 daemonx daemonx 0 Sep 9 03:12 loginuid<br />
dr-x------ 2 daemonx daemonx 0 Sep 9 03:12 map_files<br />
-r--r--r-- 1 daemonx daemonx 0 Sep 9 03:12 maps<br />
-rw------- 1 daemonx daemonx 0 Sep 9 03:12 mem<br />
...<br />
}}<br />
<br />
Some of the fields:<br />
* '''cmdline''' - arguments used to start program<br />
* '''cwd''' - current working directory for the process<br />
* '''environ''' - environment variables inside the process<br />
* '''fd/''' - directory containing open file descriptors for the process<br />
* '''exe''' - symbolic link to process executable<br />
* '''maps''' - memory mapping of the process<br />
* '''mem''' - virtual memory of the process<br />
<br />
== Usage ==<br />
<br />
To read from proc file, we can use '''cat''': {{ic|cat /proc/cmdline}} (run as the regular user).<br />
To write to the file, we can use '''echo''': {{ic|echo 1 > /proc/sys/kernel/sysrq}} (run as the root user).</div>
Randen
https://wiki.archlinux.org/index.php?title=Category:Pseudo_file_systems&diff=708460
Category:Pseudo file systems
2022-01-02T20:54:46Z
<p>Randen: Randen moved page Category:Pseudo filesystems to Category:Pseudo file systems: Other categories and article titles split filesystems into two words</p>
<hr />
<div>[[Category:File systems]]</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/sandbox&diff=708384
User:Randen/sandbox
2022-01-01T16:11:27Z
<p>Randen: Add entry for FFmpeg</p>
<hr />
<div>== My Sandbox ==<br />
<br />
* [[User:Randen/ipxe|ipxe]] - Some notes about ipxe<br />
* [[User:Randen/qemu|System emulation]] - Trying to use QEMU without libvirt<br />
* [[User:Randen/namespaces|Linux Namespaces]] - Some notes about namespaces<br />
* [[User:Randen/sysfs|Linux sysfs]] - Some notes about sysfs<br />
* [[User:Randen/FFmpeg|FFmpeg video converter]] - FFmpeg tips and tricks</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/sandbox&diff=708233
User:Randen/sandbox
2022-01-01T07:28:42Z
<p>Randen: Add link for sysfs /* My Sandbox */</p>
<hr />
<div>== My Sandbox ==<br />
<br />
* [[User:Randen/ipxe|ipxe]] - Some notes about ipxe<br />
* [[User:Randen/qemu|System emulation]] - Trying to use QEMU without libvirt<br />
* [[User:Randen/namespaces|Linux Namespaces]] - Some notes about namespaces<br />
* [[User:Randen/sysfs|Linux sysfs]] - Some notes about sysfs</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen&diff=708223
User:Randen
2022-01-01T06:59:18Z
<p>Randen: Fix another typo</p>
<hr />
<div>Arch Linux enthusiast<br />
<br />
[[User:Randen/sandbox|My sandbox]].</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen&diff=708222
User:Randen
2022-01-01T06:58:00Z
<p>Randen: Fix typo</p>
<hr />
<div>Arch Linux enthusiast<br />
<br />
[[User:Randen/Sandbox|My sandbox]].</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen&diff=708221
User:Randen
2022-01-01T06:57:22Z
<p>Randen: </p>
<hr />
<div>Arch Linux enthusiast<br />
[[User:Randen/Sandbox|My sandbox]].</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen/sandbox&diff=708219
User:Randen/sandbox
2022-01-01T06:52:37Z
<p>Randen: Populate page with some stuff</p>
<hr />
<div>== My Sandbox ==<br />
<br />
* [[User:Randen/ipxe|ipxe]] - Some notes about ipxe<br />
* [[User:Randen/qemu|System emulation]] - Trying to use QEMU without libvirt<br />
* [[User:Randen/namespaces|Linux Namespaces]] - Some notes about namespaces</div>
Randen
https://wiki.archlinux.org/index.php?title=Varnish&diff=700769
Varnish
2021-11-04T20:43:03Z
<p>Randen: Make wording more concise</p>
<hr />
<div>[[Category:Proxy servers]]<br />
[[ja:Varnish]]<br />
[https://www.varnish-cache.org/ Varnish Cache] is a web application accelerator also known as a caching HTTP reverse proxy. You install it in front of any HTTP server and configure it to cache the contents.<br />
<br />
== Installation ==<br />
<br />
[[Install]] the {{pkg|varnish}} package.<br />
<br />
== Customizing Varnish ==<br />
<br />
By default, varnish comes configured in {{ic|/etc/varnish/default.vcl}} to use '''localhost:8080''' as the only backend, default.vcl is called by the default systemd varnish.service file :<br />
<br />
{{hc| /usr/lib/systemd/system/varnish.service |<br />
<nowiki>[Unit]<br />
Description=Web Application Accelerator<br />
After=network.target<br />
<br />
[Service]<br />
ExecStart=/usr/bin/varnishd -a 0.0.0.0:80 -f /etc/varnish/default.vcl -T localhost:6082 -s malloc,64M -u nobody -g nobody -F<br />
ExecReload=/usr/bin/varnish-vcl-reload<br />
<br />
[Install]<br />
WantedBy=multi-user.target</nowiki>}}<br />
<br />
systemctl enable merely makes a symlink to the default<br />
<br />
{{bc|$ systemctl enable varnish<br />
ln -s '/usr/lib/systemd/system/varnish.service' '/etc/systemd/system/multi-user.target.wants/varnish.service'}}<br />
<br />
Override the defaults in the unit file by using systemctl edit. <br />
<br />
{{bc|$ systemctl edit varnish.service}}<br />
To override ExecStart use an empty ExecStart line first and then an ExecStart with the new values. Eg.<br />
<br />
[Service]<br />
ExecStart=<br />
ExecStart=/usr/bin/varnishd -j unix,user=nobody -F -a :6081 -T localhost:6082 -f /etc/varnish/default.vcl -S /etc/varnish/secret -s malloc,1G<br />
<br />
Also, if you change the config file {{ic|/etc/varnish/default.vcl}} you will need to reload varnish:<br />
<br />
{{bc|$ systemctl reload varnish.service}}<br />
or restart<br />
{{bc|$ systemctl restart varnish.service}}<br />
<br />
=== Manual VCL load ===<br />
<br />
If the previous VCL configuration reload failed, try loading the VCL file manually:<br />
<br />
# Connect to the varnish console: {{bc|$ varnishadm -T localhost:6082}}<br />
# Load the default VCL. Make sure it has at least one backend: {{bc|varnish> vcl.load default /etc/varnish/default.vcl}}<br />
# Make it active: {{bc|varnish> vcl.use default}}<br />
# Start the child proccess (optional): {{bc|varnish> start}}</div>
Randen
https://wiki.archlinux.org/index.php?title=User_talk:Randen&diff=642190
User talk:Randen
2020-11-23T17:34:39Z
<p>Randen: Created page</p>
<hr />
<div>==Talk page==</div>
Randen
https://wiki.archlinux.org/index.php?title=User:Randen&diff=642189
User:Randen
2020-11-23T17:33:07Z
<p>Randen: Created page with "Arch Linux enthusiast"</p>
<hr />
<div>Arch Linux enthusiast</div>
Randen