date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,353,405,094,000 |
I'm using Debian Linux on an embedded system, we use ppp to connect to the WAN via a CDMA modem. I want to find out if compression is being used by ppp.
In my /var/log/messages I see the line:
kernel: [ 54.740000] PPP Deflate Compression module registered
but in /var/log/debug I see this:
pppd[2433]: Protocol-Rejec... |
You can use the command pppstats -z to display compression statistics. If it displays all zeros then compression is not enabled.
excerpt from man page
-z Instead of the standard display, show statistics indicating the
performance of the packet compression algorithm in use.
When the -z option is s... | How can I tell if PPP compression is enabled for modem? |
1,353,405,094,000 |
I am about to start working on an embedded system which runs kernel v2.6.x.
It is configured to use its serial line as a TTY (accessible via e.g. minicom, stty), but I want to run IP over the serial line so that I can run multiple multiplexed sessions over the link (e.g. via UDP/TCP or SSH).
I don't have much more inf... |
You would first disable getty running on your serial port device /dev/ttyS0 (or whatever it is named for your hardware) to free it (for example, by editing /etc/inittab and running telinit q - if you managed to steer away from systemd) and then you would run pppd(8) on it (either manually with appropriate parameters ... | How to configure embedded kernel to use serial line for PPP instead of TTY |
1,353,405,094,000 |
I'm having an issue with pppd doing PPPoE on CentOS 6.3.
The CentOS system is a dedicated router/gateway which performs NAT (both directions) and various packet filtering. It has separate NICs for the LAN and Internet side, eth0 and eth1, respectively.
On the Internet side is a DSL modem. The modem likes doing every... |
First, PMTUd does require ICMP to be forwarded to the machine that sent the traffic. But if you allow RELATED,ESTABLISHED the required ICMP will be let through. And NAT with connection tracking will get it back to the right machine.
You're likely looking for this magic iptables line, though:
iptables -t mangle -I FORW... | Problem with path MTU discovery over pppd |
1,353,405,094,000 |
Background Information
I'm using a Linux system to route traffic for a small block of public IPv4 addresses (by enabling IP forwarding in sysctrl.conf).
The router is connecting to the ISP over eth1 using PPPoE.
The local peer address used for ppp is a manually-configured IP address that was specified by the ISP. T... |
Note: I will consider that your router's LAN is 192.0.2.0/24 and its LAN IP on eth0 is 192.0.2.1/24, to be able to give concrete explanations and a solution.
Your ISP, to spare some public IP addresses, assigned you a private IPs for internal routing purpose. That's fine because this IP is never meant to be seen outsi... | How to change the default source IP address to be something other than the address facing the default route? |
1,353,405,094,000 |
Actually I did connect both ppp0 and ppp1 using nm-connection-editor(network connection setting).
But now I wish to make a balance-rr(mode 0), and thought that bonding would do that for me. I need to know if its possible, because when I'm searching, I only see people bonding Ethernet interfaces.
When I tried to use... |
As my comment implied, you can't bond such connections.
Bonding is a layer 2 concept, ideally invisible to the higher layers. This means that packets addressed to your IP may appear at both interfaces, scheduled by the device sending the frames to you.
However, with your connection to the ISP you have two different L... | How to make bonding using mobile broadband 4g dongles |
1,353,405,094,000 |
I have a Huawei cell modem EM680 with which I can establish a connection on my Ubuntu 13.10 box just fine. I plug it in and I can establish a connection using the Connections Manager.
I have a box without X server and I want to establish a connection with that same modem on that box. I can get a serial link at /dev/t... |
First you need to see if your hardware is listed:
lsusb
Then you can install and configure usb_modeswitch, because Linux recognizes your hardware as a USB drive not as a modem (I assume that you are using Arch Linux):
pacman -S usb_modeswitch
Finally, you just got to check if your APN settings are correct:
wvdialcon... | Troubles establishing connection with wvdial |
1,353,405,094,000 |
I want to establish a ppp link to a GSM provider with my cell phone modem. The modem gets recognized and I can send AT commands just fine, but I can not get the connection established.
My chat script looks like:
#######################################
SAY 'Setting the abort string\n'
SAY '\n'
# Abort String ----------... |
Drop the "defaultroute" line and it should work.
You can set the route manually if you have to, but you probably don't have to. It looks like you have a script hooked already that sets he routes when a new interface comes up and it's clobbering pppd.
| Difficulties to establish a ppp connection to a GSM provider |
1,353,405,094,000 |
I've got a really old laptop running Windows 95, and I'd like to be able to connect it to my home network. It doesn't have an ethernet jack, nor a usb port. It does have an internal dial up modem though, and I'd like to try connecting to another modern machine running slackware. This other machine also has an internal... |
If what you really want is just to connect the notebook to your network, check if it has a PC Card or PCMCIA slot. Most notebooks, even very old ones, should have that. Then you can find a second hand PCMCIA Ethernet card for almost nothing.
| Can I set up linux to accept a dial up connection from my old windows95 laptop? |
1,353,405,094,000 |
I'm connecting a linux machine using a nowadays popular Huawei Brovi E3372-325 LTE USB Stick to the internet. The special requirement is that incoming ssh/ping/NTP/... connections must reach my linux OS.
The state is, that using usb_modeswitch -X and the option driver I can bring up the 3 ttyUSB interfaces, and connec... |
If I'm not mistake, I don't use RNDIS right now.
RNDIS is a Windows-specific network interface driver API. Um, that as nothing to do with what you're doing, right?
What might be the reason, that ppp0 does not have a MAC address? How it's even possible?
a MAC address is an Ethernet concept; and PPP is not ethernet ... | USB LTE modem without MAC address? |
1,353,405,094,000 |
I got an embedded system trying to create a ppp connection using a GSM modem. However the connection is never established and all I get is this error message in syslog:
Oct 12 08:38:48 pppd[451]: pppd 2.4.4 started by root, uid 0
Oct 12 08:38:59 pppd[451]: Connect script failed
Oct 12 08:39:00 pppd[451]: Exit.
I now ... |
Somewhere in your ppp setup (probably either in /etc/ppp/options or at the command line), you have an option called connect followed by a command used to setup the modem for a connection. It's usually a chat script. You need to find out why that command is failing. If it is a chat script, you can make it verbose by ch... | How to proceed solving ppp connection problems? |
1,353,405,094,000 |
I have a zte 3g modem. I use carrier provided dialer for connection establishment. Once the ppp connection is active, i would like to send some AT commands(for ex. Query signal strength, AT+CSQ). But the dialer i use locks the /dev/ttyUSB0 port, which is the command port to send AT commands for my modem. So is there a... |
As long as the device is used for ppp traffic, it is not possible to run AT commands at the same time1.
For this reason all modern modems will provide more than one serial interfaces, e.g. /dev/ttyUSB0 and /dev/ttyUSB1 (or /dev/ttyACM0 and /dev/ttyACM1 for USB CDC modems on linux).
Back in the days when phones had RS-... | How to send AT commands to modem once the connection is established? |
1,353,405,094,000 |
I have an adapter which on 1 side offers an RJ11 male plug, and on the other side and USB Type A female port, I also have another adapter which is similar but it offers and USB Type A male plug.
I would like to connect this to my computer and connect to the internet from there, removing the need for an external modem,... |
If that truly is just a cable adapter, with no electronics hidden underneath that black overmolding, you're not going to be able to use it to connect to the analog telephone network.
USB uses its four wires for power, ground, and a differential signaling pair, all operating at 5 V DC.
POTS uses its four wires as two s... | PPP over USB from RJ11 |
1,353,405,094,000 |
When I try to connect to the Internet using pon provider, I get this error:
error sending pppoe packet: Network is down
error receiving pppoe packet: Network is down
If I configure the Internet with pppoeconf, then run pon provider, the connection works. I should not have to run pppoeconf every time I turn on my comp... |
Checkout man 5 interfaces. The /etc/network/interfaces file tells bunch of scripts (debian package ifupdown) how to bring up various network interfaces. You'd find stanzas like the following in them:
auto eth0
iface eth0 inet dhcp
The 'auto eth0' line tells the ifupdown bunch of scripts to 'UP' the eth0 interface whe... | PPPoE reports network is down |
1,353,405,094,000 |
My pppoe client automatically adds an iptables rule iptables -t mangle -o "$PPP_IFACE" --insert FORWARD 1 -p tcp --tcp-flags SYN,RST SYN -m tcpmss --mss 1400:65495 -j TCPMSS --clamp-mss-to-pmtu from /etc/ppp/ip-up.d. However, this rule in nftables looks like
table ip mangle {
chain FORWARD {
type filter ho... |
Explanation
the rule set through iptables-nft is using xtables kernel modules (here: xt_tcpmss and xt_TCPMSS) through the nftables kernel API along a compatibility layer API, even if xtables was initially intended for (legacy kernel API) iptables.
Native nftables cannot use xtables kernel modules by design: whenever ... | Why MSS clamping in iptables(-nft) seems to take no effect in nftables? |
1,353,405,094,000 |
I have a couple of 3G modems installed into my RaspberryPI via USB hub with external power adapter. The goal is to create several ppp connection via these modems and share the internet via socks5 proxy (1 carrier -> 1 dedicated port).
root@raspberrypi:/etc# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mt... |
I found the problem. First of all, during ppp session I especially set up the ppp peer without default route provisioning. Because of this the outgoing packet from pppX interface had no idea how to be routed. The situation was resolved with so called policy based routing.
First of all you need to pre-define all your a... | Dante SOCKS5 server does not send traffic through ppp interface |
1,353,405,094,000 |
I've checked their man pages, but I'm still confused. I just know they are all related to ppp connections.
I'm surprised that when I googled "pon wvdial relationship", I get no useful results, so I ask this question here.
Who can tell me the role of these three tools? I still feel they do the same thing... and... I fi... |
chat & pppd
chat is a program that the pppd program can use to dial a modem connection. It is provided with a script of that describes the conversation required to establish the connection. (A conversation in this context is a series of commands issued by chat, and responses received from the modem.)
pon & poff
pon ... | What is the relationship between wvdial, pon and chat? |
1,353,405,094,000 |
I need to install remotely Omxplayer on a Raspberry Pi.
RPi is connected by a LTE modem through PPP0 interface.
My RPI is placed another country and I connect to Raspberry through my VPN using SSH.
My VPN does not have access to Internet and the default gateway is 10.1.64.1 (PPP0).
RPI has also WiFi Connection: WLAN0 ... |
If I understand correctly you have this arrangement:
(Client)---LAN?---(VPN)---ppp0---(Raspberry Pi)---wlan0---(the internet)
You mentioned that when you change your default route to use wlan0, you lose SSH access. You also indicated that you can't access the internet through ppp0 (through your VPN).
If you just wa... | How can I select the network interface for installing a program in linux? |
1,353,405,094,000 |
I have two Raspberry Pis with their serial ports connected to each other. I have established a PPP link between the two of them and successfully ICMPV6 pinged and opened TCP sockets between them. But I can't work out how to get the 'client' pppd to accept the link-local IPv6 address provided by the 'server' pppd. I am... |
The answer turned out to be that there was a bug in version 2.4.7 of pppd for Linux.
The solution was simply to upgrade to version 2.4.9 and I have successfully the 'client' to accept the interface identifier from the 'server'.
Here is the debug output on the client:
$ sudo pppd file ./ppp-options ipv6cp-accept-local ... | Configuring pppd to accept link-local IPv6 address from remote peer |
1,353,405,094,000 |
I am trying to establish a 3G connection with Raspbian, a 3G USB dongle, usb_modeswitch and wvdial. I followed this tutorial which has worked well before with a different 3G dongle.
My 3G dongle is a ZTE D6601, the SIM has no PIN and the connection works flawlessly with the ISPs tool under Windows and under Ubuntu 15 ... |
I finally figured out a way: I dropped wvdial and used nmcli (from the network-manager package) instead. I established the connection 10 hours ago and it is still active with the same IP. Here's how I did it:
Step 1: Get usb-modeswitch to run so your 3G USB stick is recognized as a modem, not a storage device. I am no... | 3G connection with wvdial gets no IP, exits with code 16 |
1,581,461,611,000 |
my project needs mobile internet. I am trying to achieve this by using a LTE stick modem with a M2M sim (public IP, no NAT)
This works well on ubuntu (5.3.0-29-generic), but I cannot get it working on Raspbian Buster (4.19.97+)
Feb 11 22:31:48 raspberrypi systemd[1]: Reloading.
Feb 11 22:31:51 raspberrypi systemd[1]: ... |
Facing a similar issue,
sudo route add default ppp0
worked for me.
If you need the process automated, you can create a script in /etc/ppp/ip-up.d, it will be executed when the connection is set.
| Linux ppp0 and default route and how to reach public internet |
1,581,461,611,000 |
My PPTP client is Ubuntu Desktop 14.04.2LTS.
My PPTP Server is a Buffalo DD-WRT Firmware.
If I establish my PPTP VPN connection (named Themiscyra):
luis@PortatilHP:~$ sudo pon Themiscyra
luis@PortatilHP:~$ sudo ifconfig
eth0 Link encap:Ethernet direcciónHW 98:4b:e1:c7:b8:4c
Direc. inet:192.168.11.2 ... |
Take out the .sh from the script name.
You can test with:
run-parts --test /etc/ppp/ip-up.d
If it does not shows up, it is because of permission/file naming.
| VPN: Script at /etc/ppp/ip-up.d/ not autoexecuting on PPTP connection established |
1,581,461,611,000 |
I always used static ip or dhcp configurations in past, and this is what normally happens:
when I pull out the cable my interface goes down
when I plug back the cable the interface goes back up and in case of dhcp it gets a new ip
This time I moved to pppoe with the autoconfiguration did by debian installer (running... |
No.
provider is the file where the ppp configuration is stored, probably at /etc/ppp/peers/provider. It´s somehow a "profile" of your ppp connection. What defines the interface name is the last part of the second line, inet ppp.
To redial automatically your ppp conection, you should add the persist parameter to this p... | PPPoE not working as Hotplug in particular conditions (Realtek 8169 NIC and Kernel 3.x) |
1,581,461,611,000 |
I'm working on a IMX6 based board, and I need some advice to handle my modem.
I've successfully configure the modem, and mounted the ppp. The modem is working fine and everything's great, but now I want to send him some AT command while running.
Here is the content of my option file :
/dev/ttyACM0
115200
persist
maxf... |
It is not generally possible to send AT commands to a modem while a call is in progress. This applies to all AT-compatible modems, "regular" dial-up modems and mobile phone modems alike, and it has nothing to do with PPP.
By the way, a point of terminology: PPP sessions are not mounted. Mouting and umounting are terms... | Sending command to an already mounted modem |
1,581,461,611,000 |
I run FreeBsd box with pppd over Ethernet. Everything works just fine with only one exception. Sometimes, not too often, the connection becomes stale. Everything looks like if it is ok: ifconfig shows it is up, ppp says that the link is ok, but traffic does not come through. What I do is run killall pppd and then rest... |
So, I came up with this solution.
enable lqr
set lqrperiod 5
| Reconnect if the link is stale |
1,581,461,611,000 |
I use wvdial to connect to the net with with my USB modem. It works correctly, and I am quite happy with it. When I start it in XFCE I have it set to output to a borderless, transparent terminal so the status displays on my desktop, life is good. Everything is great, I just want to tweak it.
I'm hoping to filter the o... |
What I would do is to redirect the output of wvdial to a file, and separately print out “interesting” lines from the file as they appear.
wvdial >wvdial.log 2>&1
Here's one way to filter the file. tail -n +1 -f means to follow the file as it grows (-f), starting with the first line (-n +1). The filter grep -v means t... | How to filter wvdial/pppd terminal output |
1,581,461,611,000 |
Two os installed on my pc,today a strange thing happens:my ethernet device lost in debian!
Enter into win10 from grub, i can connect internet with pppoe.
Enter into debian10 from grub :
ifconfig
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 sc... |
The package r8168-dkms_8.048.03-1~bpo10+1_all.deb includes the file /etc/modprobe.d/r8168-dkms.conf, which will tell the kernel to load the r8168 module instead of the default r8169 for specific card models.
The package includes the r8168 module in source code form only: in order to make it usable, the dkms utility wi... | My ethernet device lost in debian |
1,581,461,611,000 |
There are are lot of excellent answers to this question which involve setting iptables routes on the router. However I need to set up the iptables routes on the client.
I'm working on an embedded system. This is connected to the internet using ppp and a GPRS modem. The system runs an application that makes https requ... |
libcurl respect environnement variables http_proxy https_proxy
So this is very simple :
export http_proxy=http://yourproxy.example.com:3128/
export https_proxy=http://yourproxy.example.com:3128/
./my-application-exe
source:
https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
| How to set up routing of https to proxy server on client |
1,581,461,611,000 |
I used this guide to connect to my VPN server (pptp) which is the only one guide that worked from many tutorials.
After connecting to the VPN server the route table looks like below and sometimes it's only the last 2 lines (very random I'm sure there's a reason).
Destination Gateway Genmask Flags M... |
Your Issue
I would recommend a separate routing table for this, since I assume the traffic arriving at 192.168.0.2 has a source address of 35.100.100.35. The issue you're having is that 35.100.100.35 isn't listed in your routing table, so the default is being used.
You might be able to get away with something as simpl... | route table with eth0 and ppp0 broken |
1,581,461,611,000 |
I've got a Buildroot-based embedded system that uses a 3G modem (Cinterion PH8-P) and PPP to connect to the internet. The 3G modem is a USB device that provides 4 ttyUSB ports. One of these is used for PPP, whereas another is used for GPS.
Occasionally, the 3G modem will stop working and will need to be restarted. I d... |
As it turns out, PPP is affecting it's own serial port, and since that's the one that's used to configure the GPS, that's what's causing the problem.
By comparing the results of stty -F /dev/ttyUSB3 before and after running PPP, it became apparent that PPP was configuring the serial port in raw mode, which meant I cou... | ppp affecting serial ports so that they cannot be used if modem is reset |
1,581,461,611,000 |
I am trying to establish a cellular connection to Verizon through my Multitech Multiconnect Dragonfly (MTQ-LVW3-B02). I am able to connect to Verizons network and get an IP address. The problem is that after a few seconds the modem hangs up the connection.
Mar 26 19:26:57 localhost NetworkManager[2071]: nm-pppd-plugi... |
I figured out the answer. The problem was that Verizon will cut a connection if it receives 10 invalid packets in a span of 2 minutes. The problem was that I wasn't NATing packets properly since I was also using this as a router. The packets being sent out from the bridged lan were being sent to verizon with a source ... | cellular modem: pppd modem hangup |
1,581,461,611,000 |
Sorry if this is a repeat. I searched, but with no luck.
I'm using SNMPd on an openwrt/wr host with some ppp and tun connections. These connections get IDs in the if table, and will actually get a new ID whenever the tunnels reconnect.
Nagios (check_mk), when that happens, complains that an interface went down; oh, a... |
I figured it out, so here's an answer so I'm not denvercoder9.
Adding a new config to the snmpd.conf seems to have both trimmed the interface march as well as prevented complaints.
interface_replace_old yes
I think that's the one. It could be that simple.
Try it yourself if you run into the same problem, and let me ... | Nagios/SNMP - devices alerting when ppp/tun connections cycle |
1,581,461,611,000 |
I'm using a PPP to communicate with a device. So far what I have been doing is instantiating PPP on my machine (Fedora 29) and on the device (Yocto Linux). Then I open a TCP/UDP socket and communicate with the device. My serial link (which is why I use PPP) has low baud rate, 4800 to be exact. I cannot change it, it i... |
PPP can run protocols other than IP; the most common is of course IPv6. But numerous others have been (and maybe still are) run over PPP. Wikipedia even has a list of protocols that run over PPP, though I'm not sure how many work on Linux.
Also — the reason you run PPP over a serial link is because you want to run a h... | using PPP without TCP/IP |
1,581,461,611,000 |
I have a PC on a test bench with 2 interfaces, enp2s0 and enp3s0. The IPs are public and obtained with DHCP, based on the interfaces MACs. There is a second computer on my bench, a Raspberry Pi Compute Module 3, which I want to expose on the internet. The RPi and bench sever are connect together through PPP, over a se... |
The IPs are public and obtained with DHCP, based on the interfaces MACs.
Which means that when bridged the ppp interface would need to get a third public IP obtained with DHCP. Which won't work with ppp.
bridge ppp0
Even if ppp0 wouldn't need a public IP, it's a point-to-point connection, as the name implies. So y... | Bridge PPPoS with ethernet |
1,581,461,611,000 |
Had no problems with ppp. Ran and update and it stopped working.
My setup:
Lenovo T470s with Fedora 28, Linux user-fedora 4.18.13-200.fc28.x86_64 #1 SMP Wed Oct 10 17:29:59 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
custom board with Linux custom-board-0 4.14.0-xilinx-v2018.2 #1 SMP PREEMPT Mon Sep 24 12:55:51 PDT 2018... |
After a day of debugging it turned out to be an issue with the custom board. One of the pins in the connector turned out to be electrically damaged. So it is not an issue with Fedora or PPP, it is an issue with the hardware connector. Thank you everyone for looking into it.
| ppp stopped working on Fedora 28 [closed] |
1,581,461,611,000 |
I set up an R-Pi 3G Modem combo with wvdial and it's working perfectly. I can access everything on the internet from the Pi. But when I try to access the Pi from the internet there is nothing, zero connection. As far as I can tell there is no firewall so I have no idea what blocks the data. If I connect the Pi to my L... |
Possibly, your 3G provider gives you a private IP address from one of these ranges
10.0.0.0 - 10.255.255.255
172.16.0.0 - 172.31.255.255
192.168.0.0 - 192.168.255.255
In this case, you're behind ISP's NAT and can't access Pi from the internet, but you can access the internet from Pi.
| Can't access Rasperberry Pi over the internet |
1,581,461,611,000 |
I bought a VPS from hostinger.com. Now I'm trying to set VPN connection to another server using PPP, but I have an error:
Sorry - this system lacks PPP kernel support
I tried different versions: Debian 8, 9 and Ubuntu 18.04 (Linux xxx.local 4.15.0) but I always had the same error.
What can I do to "add support" for ... |
You asked, "What can I do to "add support" for PPP?".
Really this should be a case of asking your hosting provider. It may be that they won't support PPP because you've rented a VPS and they need to use a generic shared kernel.
You then asked "So if PPP is not a good way to connect.. what should I use?".
PPP is not a ... | This system lacks PPP kernel support |
1,581,461,611,000 |
Im using a 3G USB huawei modem to get access to the internet, therefore, i have an active ppp interface addressed.
I want to share this access with my wlan interface so that every device that will get connected to my wifi hotspot will get access to the internet too.
How can i do that?
Thanks
|
In ubuntu 14 or ubuntu 15, you can use this command :
- first, you activate routing :
sudo echo 1 > /proc/sys/net/ipv4/ip_forward
- second, you write a dynamic translation rule source IP address.
sudo iptables -A POSTROUTING -t nat -s address/mask -o internet_interface -j MASQUERADE
where adress/mask is a address r... | How to share a ppp internet connection over wlan interface on ubuntu? |
1,581,461,611,000 |
We use wvdial to initiate a cell modem connection. We wrap it with nohup, launched by a cron job that checks if all is well every minute (everything we read said that wvdial and the associated hardware is unreliable enough that you want something like the cron job to watchdog it).
When that network comes alive (always... |
You could use "/etc/ppp/ip-up" to add programs that run once the interface is up. I have work with it several times and it works. You could also use "/etc/ppp/ip-down" in case you need to run programs once the connection is over.
| Service that runs once when ppp0 connection shows up |
1,581,461,611,000 |
I am new to ppp protocol and its configuration and got a problem that ppp connection terminated, no ppp0 created.
This modem(telit lm960a18) works fine with this sim card and APN using network manager in VM. since there is no nmcli nor mmcli in my hardware, but ppp is available, I need to make ppp connection work on t... |
With the noip option, you are disabling IPCP (IP Control Protocol) negotiation, and thus IPv4 communication. So pppd won't ask for it.
You also don't have the +ipv6 option to enable IPv6CP and IPv6. Apparently your pppd will not try for IPv6 unless specifically asked to.
And if I recall correctly, the side that's init... | ppp connection terminated: "No network protocols running" |
1,388,005,216,000 |
When it comes to passwd/user-password-crypted statement in a preseed file, most examples use an MD5 hash. Example:
# Normal user's password, either in clear text
#d-i passwd/user-password password insecure
#d-i passwd/user-password-again password insecure
# or encrypted using an MD5 hash.
#d-i passwd/user-password-cr... |
You can use anything which is supported in the /etc/shadow file. The string given in the preseed file is just put into /etc/shadow. To create a salted password to make it more difficult just use mkpasswd with the salt option (-S):
mkpasswd -m sha-512 -S $(pwgen -ns 16 1) mypassword
$6$bLyz7jpb8S8gOpkV$FkQSm9YZt6SaMQM7... | What hash algorithms can I use in preseed's passwd/user-password-crypted entry? |
1,388,005,216,000 |
I want to replicate the Debian installation choices made for my system's current configuration in the installation of a new system.
Debian can be pre-configured through a "pre-configuration" (aka "preseed") file, which basically contains the answers to the questions the installer will ask.
The documentation states tha... |
Short answer
From the Debian wiki page dedicated to D-I preseed :
Do not work off a debconf-get-selections (--installer) generated preseed.cfg but get the values from it and modify the example preseed file with them.
The preseed example file provided by Debian should be enought to start but you can find a lot of ot... | What values from debconf-get-selections should not be preseeded? |
1,388,005,216,000 |
I want to automatically partition all of my workstations in the same way:
First partition is a bootable 1GB ext4 /boot partition
Second partition is a 2GB swap partition
Third partition is an ext4 / partition that takes up whatever is left
All partitions should be formatted
I think adding this to my preseed.cfg will... |
I figured this out after spending days scouring the internet for any shred of information about partman - it is not very well-documented at all. Here's the config I used:
# This automatically creates a standard unencrypted partitioning scheme.
d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string regula... | Using d-i partman recipe strings? |
1,388,005,216,000 |
Please see the image below, is there a preseed directive to skip this Debian9 installer step?
Currently I use the following config relevant to the package manager:
### Apt setup
d-i apt-setup/non-free boolean true
d-i apt-setup/contrib boolean true
d-i apt-setup/local0/source boolean true
### Package selection
taskse... |
For it not to scan your DVD/netinst image, add these directives to your preseeding configuration:
d-i apt-setup/cdrom/set-first boolean false
d-i apt-setup/cdrom/set-next boolean false
d-i apt-setup/cdrom/set-failed boolean false
| Preseed directive to skip another CD/DVD scanning |
1,388,005,216,000 |
I would like to make a completely unattended installation of Ubuntu Server 14.04 from an USB drive where I extracted the ubuntu-14.04.2-server.iso
In /syslinux/txt.cfg of the USB drive, I added the following section
menu label ^Unattended Ubuntu Server installation
kernel /install/vmlinuz
append noprompt cdrom-detect/... |
Doing what py4on suggested does simply shorten the list of available languages (to the extend of having one single element: en), but does not automate the language selection. It was probably working on older versions of Ubuntu but the requirement is for the Ubuntu Server 14.04. On 16.04 the instructions below may chan... | Prevent Language selection at ubuntu installation |
1,388,005,216,000 |
I created a preseed script with help from this blog and I altered it to create some logical volumes on it too.
The result of the script is this:
d-i debian-installer/locale string en_US.UTF-8
d-i debian-installer/splash boolean false
d-i debian-installer/language string en
d-i debain-installer/country ... |
The first thing that I would change is the number of spaces between "string" and "recipe_sps".
According to this at 12.3.2.2: "the fourth and last field contains the value for the answer. Note that it must be separated from the third field with a single space; if there are more than one, the following space characters... | Debian preseed doesn't create lvm's, but are in the expert recipe |
1,388,005,216,000 |
I'm currently working on PXE booting 10 or so machines to install Debian on them over the network from a centralized DHCP + TFTP server. I'm using the TFTP server to serve the Debian netboot image to the PXE clients. I'm also serving them a preseeding file via FTP.
So far (after hours of Google, trial and error) so g... |
Instead of going to the Internet, you could go to a local debian repository.
This link explains how to setup a debian repository.
You would then have to find how to set your netboot image to get the packages from your local repository. I do not know how to do that, but a liar DNS server could be a solution.
| Debian PXE Preseeding: Can I clone my existing Debian system instead of using the Internet? |
1,388,005,216,000 |
I'm building a custom ISO image of Debian 10 stable ("buster") using preseeding, and my custom preseed.cfg file works perfectly except for one thing: I'd like it to configure /etc/apt/sources.list with my chosen repositories so that I don't have to do it manually every time I install a new system.
The goal is an /etc... |
The d-i preseed/late_command string commands in preseed.cfg do what you want. I added a custom sources.list file to the iso and then copy that over after the installation completes. Add these commands at the end of your preseed.cfg.
d-i preseed/late_command string \
cp sources.list /target/etc/apt/sources.list; \
in-t... | How do I set mirrors in /etc/apt/sources.list with a Debian preseed file? |
1,388,005,216,000 |
I tried to create a custom distribution based on debian, after reading debian document, I found preseed file that can generate debian with preconfigured parameters. But this is not enough for me, because I need to add some packages with their dependencies in the generated iso file, and I need to script execution after... |
There are scripts here: https://github.com/dotzero/vagrant-debian-wheezy-64 to take a netinst iso and remaster it with preseed options. This could be a good starting point.
There is a latecmd option in the preseed that will let you run a command just before the installation finishes. If the latecmd can't do everyt... | Make custom iso debian file |
1,388,005,216,000 |
I'm currently in the progress of preseeding a Debian installation with custom setup scripts running after the actual installation to create a simple installer that will create everything that I need.
Now I found how to install additional packages and added the NetworkManager package, to simplify networking stuff. Howe... |
Working with wired connections
By default, NetworkManager generates a connection profile for each wired ethernet connection it finds. At the point when generating the connection, it does not know whether there will be more ethernet adapters available. Hence, it calls the first wired connection "Wired connection 1". Yo... | Issues with installing NetworkManager during Debian installation with preseeding |
1,388,005,216,000 |
I can't find anything on ask_detect in any of the man pages for setupcon and almost all my search results are examples of preseed files with it set to false; nothing useful at all.
What does it actually do?
|
Finally found an answer via some Ubuntu docs. It disables the dialogue asking whether the installer should attempt to (sort of) automatically detect your keyboard code by making you press a few random keys.
| What does `console-setup/ask_detect` in a preseed config do? |
1,388,005,216,000 |
The EFI partition is formatted in ext4 during the setup of debian whereas it should be vfat.
I am trying to preseed the install of debian jessie and I can't get it working since the UEFI partition is formatted in ext4 (got information with blkid). I can't get it formatted in vfat.
My preseed for partitionning is the f... |
I did found a workaround, I had to duplicate the efi partition.
I don't know why but it does work so that suits me.
Maybe there is a ticket to open at debian or somewhere else...
| Preseeding debian install - EFI |
1,388,005,216,000 |
As a follow up to this question, I am trying to fully automate the Debian (squeeze) installation procedure. I have so far managed to mount an ISO image of the main Debian DVD and serve it over FTP to the client. The thing is, the client freezes while trying to detect hard drives. After a certain timeout interval, it p... |
Silly me, the answer was right there in the Debian forums if I knew where to look.
It was as you guessed, Guardian, to do with the initrd. The thing is, the DVD image initrd contains more modules than the netboot one. The pertinent ones here being SATA drivers. So I followed the advice in the 9th post in that thread a... | Preseeding Debian Install From Local Mirror: No Disks Detected |
1,388,005,216,000 |
I'm trying to get a Preseed file working on a 119GB hard drive and it seems there is not enough space. Basically what I want to do:
/dev/sda1 ext4 mountpoint /boot size 512MB
/dev/sda2 lvm into vg1 size 40GB
/dev/sda3 lvm into vg2 size 70GB
Some logical volumes in each of the volume groups.
The problem that I am enco... |
So after some research (to the 4th,5th page of google searches!) I read (and I'm also pretty sure it's true) that partman/preseed will calculate total size as sum of the size of all the partitions, it doesn't matter if there are LV partitions which are part of a VG.
If I add the maximum size numbers, indeed, I am gett... | Preseed - not enough disk space? [closed] |
1,388,005,216,000 |
I know that you could extract serial number from machine running
dmidecode -t system, but how could I do that when running preseed installation of Debian? dmidecode command is not yet available, is it somehow possible to install/run it at the installation of the distro?
|
Depends on your environment and precise needs:
If you boot the installer via Syslinux, you can use SYSAPPEND 0x80 to put it on the kernel command line.
Or you can preseed anna/choose_modules to dmidecode-udeb to make it available in the installer environment.
Or you can parse the serial number out of /sys/firmware/dm... | How to get device serial number when running Debian preseed installation? |
1,388,005,216,000 |
I would like to install Alpine using preseed.cfg. However, I cannot find one online.
Does alpine support preseed in the first place? If yes, is it possible to edit another preseed and adopt it for Alpine? For example I have a debian preseed, but I see that some options are debian specific. Example:
d-i grub-installer... |
Alpine Linux does not support preseed since it's a debian-only feature, which integrates with debian-installer.
Anyway, Alpine does support what is called an "unattended" installation.
You should provide an "answerfile" to setup-alpine script.
More info can be found here: https://wiki.alpinelinux.org/wiki/Alpine_setup... | Alpine Installation with preseed cfg |
1,388,005,216,000 |
When I install debian using the preseeded file, I have a live USB stick mounted as sda1 and ssd drive as sdb1. So I install MBR to sdb1. But when USB stick is removed SSD drive becomes sda1. And /boot/grub/grub.cfg does not work any more. I added a late command in order to fix that according to the documentation. It i... |
The solution is actually not to use the last update-grub, as it restores the configuration to the one that is currently in use during installation.
So my preseed step is the following:
d-i preseed/late_command string \
in-target sed -i 's#^\(GRUB_CMDLINE_LINUX_DEFAULT="quiet\)"$#\1 root=/dev/sda1"#' /etc/default/g... | Reconfigure grub in preseed late_command |
1,388,005,216,000 |
I am using a preseed file for my Debian installs. I am using 1TB drives, and I would like to use MS-DOS partition tables. It is defaulting to GPT.
Is there a way to choose which type of table to use in the preseed file?
|
The debconf question partman-partitioning/default_label should set the partition table type.
You also need to set the boolean question partman-partitioning/confirm_write_new_label to true or partman will not overrite an existing partition table.
So you should put in your pressed file :
d-i partman-partitioning/default... | Select drive partition table in preseed file automated Debian install |
1,388,005,216,000 |
I'm trying to install Debian 10 using this official ISO file:
http://cdimage.debian.org/cdimage/release/current/amd64/iso-cd/debian-10.9.0-amd64-netinst.iso
I modified this ISO file to automated with preseed.cfg, pack it using xorriso then write this ISO file into a disk called /dev/sdb using the following command:
wg... |
Debian netinst ISO image is created primarily to be burned on CD (DVD). Some years ago, it was slightly modified, so it can be saved on USB falsh disk. The modification adds a fake MBR sector which points to the first bootable partition starting at sector zero! I did not tried to place such ISO image onto regular disk... | How to mount /dev/sdb to /cdrom on Debian installation startup |
1,388,005,216,000 |
I am pxe installing Ubuntu over a network, unattended. I want Ldap installed as well, but I need to provide the ldap db root password in the seed:
ldap-auth-config ldap-auth-config/rootbindpw password
How can I keep this secure? I don't want to provide the plain text password on this line.
|
AFAIK, it's not possible.
You can preseed a pre-encrypted password for the root and the first user accounts. You can even do it with the grub password (and a few others too). e.g.
d-i passwd/root-password-crypted password [MD5 hash]
d-i passwd/user-password-crypted password [MD5 hash]
d-i grub-installer/password-cry... | How to provide password in a secure way to LDAP seed? |
1,388,005,216,000 |
I try to create Debian Jessie installer which will be fully automated. I use for this purpose customised pressed file. For testing I use VirtualBox. Everything is all right, except one error at the partitioning stage. When the installer creates partition table, an error occurs:
The attempt to mount a filesystem with t... |
method{ swap } forman{ } \
Typo there, forman should be format.
Just in case, search swap in a preseed example.
| Failed to create/mount swap during automated installation of Debian Jessie using preseed file |
1,388,005,216,000 |
I am trying to auto install debian buster with ipxe, it seems that the boot parameters don't work in the ipxe menu. I always get the language section. So the preseed isn't loaded. Here is the relevant entry in the ipxe menu:
:d10-dc-node
set base-url https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-insta... |
I finally could install debian buster fully unattended by using the following Kernel arguments:
:d10-dc-node
set base-url https://d-i.debian.org/daily-images/amd64/daily/netboot/debian-
installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
initrd tftp://my.ipxe.server/preseed/debian_buster_node.seed /... | boot parameters seems not to work with ipxe and daily image |
1,388,005,216,000 |
I'm trying to create a LUKS LVM disk partition autmatically using preseed on Debian 10 (Buster). I have only a single disk /dev/sda with the size of 80GB and it has system memory of 4GB
Here is my full preseed configuration:
#### Preseed preconfiguration file (for Debian buster)
### Partman early command
### Kernal pa... |
It's working! First as mentioned by @cas, I made a mistake when declaring the size of the home directory where I accidentally used the size of the overall disk. But the main problem here is the syntax error that prevented home directory from created. Surprisingly, the debconf-set-selections that has syntax checker usi... | Debian preseed does not create encrypted disk with LUKS LVM properly |
1,394,619,078,000 |
From man renice:
Users other than the super-user may only alter the priority of processes
they own, and can only monotonically increase their ``nice value'' (for
security reasons) within the range 0 to PRIO_MAX (20) [...]
So, I can renice my own processes upwards (give them lower priority) but never downwards:... |
Since linux 2.6.12, that depends on the value of the RLIMIT_NICE limit (ulimit -e). Which can take values from 0 to 40. That limit is more the limit on the priority of the process (the greater that number, the higher the priority a user can set for a process).
You'll notice the default value is 20 on ubuntu 10.04 and ... | Why can't I use renice to increase a process' nice value? |
1,394,619,078,000 |
I would like to start a process with a nice value of -20. This requires me to use a command like
sudo nice -n -20 matlab
However, this starts matlab as root too. Is there a way to have matlab as non-root?
My current approach is
sudo nice -n -20 sudo -u myusername matlab
which to me looks like a hack. Is there a dire... |
I would start it normally and use "renice" afterwards...
However I was able to make a quick hack together with "su" which works:
sudo nice -n -20 su -c command_to_run user_to_run_as
If you don't have to give sudo a password - perhaps because you've already just given it - you may add an & to put the whole thing in th... | How do I start a process with a nice value of -20 and not give it root privilege? |
1,394,619,078,000 |
I'm running software that overloads disk IO sometimes. I don't need fast response from that software, I need fast response from other applications, so I could set low process priority for that. I want to ask how process priority affects disk IO priority for a process.
I tried a small experiment: I set low priority (in... |
Under Linux, by default, a process's IO priority is derived from its CPU priority according to the formula
io_priority = (cpu_nice + 20) / 5
IO priority ranges from 0 to 7 with 0 being the highest priority. CPU niceness ranges from -20 to 19 with -20 being the highest priority.
You can use the ionice command to chang... | How disk IO priority is related with process priority? |
1,394,619,078,000 |
How can i view the priority of a specific process ?
|
The top command lists the priority of running processes under the PR heading. If you have it installed, you can also search for a process and sort by priority in htop.
| What is a command to find priority of process in Linux? |
1,394,619,078,000 |
I have a regular process that's not so important but will consume very much CPU power. I have another process which is really important, but it spends most of the time idle, but when it gets a job it really needs high computing power.
I tried running with nice -20 ./low_priority_process and nice --20 ./high_priority_p... |
Have a look at cgroups, it should provide exactly what you need - CPU reservations (and more). I'd suggest reading controlling priority of applications using cgroups.
That said, put the important yet often idle processes into group with allocated 95% of CPU and your other applications into another one with allocated 5... | Run Linux process at very very low priority? |
1,394,619,078,000 |
How can I view the IO priority of a process? like to see for example if something has been ionice-ed.
|
ionice [-p] <pids/>
For example:
$ ionice -p `pidof X`
none: prio 0
This means X is using the none scheduling class (best effort) with priority 0 (highest priority out of 7). Read more with man ionice.
| How do I view the IO priority of a process? |
1,394,619,078,000 |
According to the man page, and wikipedia; nice ranges from -20 to 20.
Yet when I run the following command, I find some processes have a non numerical value such as (-). See the sixth column from the left with title 'NI'.
What does a niceness of (-) indicate?
ps axl
F UID PID PPID PRI NI VSZ RSS WCHAN... |
What does a niceness of (-) indicate?
Notice those also have a PRI score of -100; this indicates the process is scheduled as a realtime process. Realtime processes do not use nice scores and always have a higher priority than normal ones, but still differ with respect to one another.
You can view details per proces... | What does a niceness value of (-) mean? |
1,394,619,078,000 |
I want to run mplayer with higher priority than any other processes, including the IO-processes. How can I do that?
|
To set niceness (CPU bound) use nice. To set IO niceness (IO bound) use ionice. Refer to the respective man pages for more information. You can use them together as follow:
ionice -c 2 -n 0 nice -n -20 mplayer
Note: the lowest level of niceness (lower means more favorable) you can define is determined by limits.conf.... | Run process with higher priority |
1,394,619,078,000 |
I would like to understand cgroups better and would like to understand the use-cases for applying cgroups.
Are cgroups a good way for prioritizing different applications (i.e, giving higher priority to specific types of applications like web servers)?
|
There are several uses for cgroups. From the system administration probably the most important one is limiting resources -- the classical example here being the cpu access. If you create a group for e.g. sshd and give it some non-negligible CPU time share (compared to other groups or the default under which fall all u... | controlling priority of applications using cgroups |
1,394,619,078,000 |
If I do the following command on my standard Linux Mint installation:
comp ~ $ ps -eo rtprio,nice,cmd
RTPRIO NI CMD
...
99 - [migration/0]
99 - [watchdog/0]
99 - [migration/1]
- 0 [ksoftirqd/1]
99 - [watchdog/1]
I get some of the processes with realtime priority of 99.
What is the meaning of rtprio in a n... |
"Real time" means processes that must be finished by their deadlines, or Bad Things (TM) happen. A real-time kernel is one in which the latencies by the kernel are strictly bounded (subject to possiby misbehaving hardware which just doesn't answer on time), and in which most any activity can be interrupted to let high... | Real time priorities in non real time OS |
1,394,619,078,000 |
I'm trying to understand the Completely Fair Scheduler (CFS). According to Robert Love in Linux Kernel Development, 3rd edition(italics his, bold mine):
Rather than assign each process a timeslice, CFS calculates how long a
process should run as a function of the total number of runnable
processes. Instead of us... |
The 2 sentences are just explaining 2 instances of how CFS could work - the former is when 2 tasks have the same nice value and the latter when the 2 tasks have different nice values. In general, the time slice calculated for each task boils down to this formula:
timeslice = (weight/total_weight)*target_latency
weigh... | Does the timeslice depend on process priority or not under Completely Fair Scheduling? |
1,394,619,078,000 |
On Windows I have frequently changed the priority of a games process to 'high' or 'realtime' to get a performance boost. This has never resulted in any problems with my hardware. I was thinking that maybe I could do this on Linux using the chrt command to change the realtime priority of the games process, as reniceing... |
Changing the priority of a process only determines how often this process will run when other processes are competing for CPU time. It has no impact when the process is the only one using CPU time. A minimum-priority process on an otherwise idle system gets 100% CPU time, same as a maximum-priority process.
So you can... | Is changing the priority of a game's process to realtime bad for the CPU? |
1,394,619,078,000 |
I am using prlimit in Ubuntu to do some resource restrictions in my sandbox which has been very helpful. However, I am not quite sure what to do with RLIMIT_NICE. The docs say:
RLIMIT_NICE (since Linux 2.6.12, but see BUGS below)
Specifies a ceiling to which the process's nice value can be
... |
In fact, RLIMIT_NICE allows you to bypass the basic rule that says that "a process can raise its nice value only if owned by root".
Demonstration:
# ulimit -e 30
# su nobody
$ nice -n -10 top
You will see that your top process runs with niceness -10.
Now if you try nice -n -11 top, it will run with niceness 0, becaus... | Is there any use for RLIMIT_NICE? |
1,394,619,078,000 |
Inside the /etc/fstab file, in the sixth column, there is a number that corresponds to whether a filesystem should be scanned for errors. Possible values are:
0 - skip
1 - high priority
2 - low priority
Why was fsck 'priority' introduced in /etc/fstab?
|
The field exists so you can define the order in which filesystems are checked. Different partitions on the same drive should not be checked at the same time since the IO going to each filesystem will compete with one another, and slow the whole process down. Filesystems on different physical disks could be set to ch... | Why was fsck priority introduced in /etc/fstab? |
1,394,619,078,000 |
I know you can change a process niceness with setpriority or nice or renice.
However, does Linux automatically adjust/change a process niceness without user input?
I have a process for which I use setpriority in C, like so:
setpriority(PRIO_PROCESS, 0, -1)
When the process is running, I can see its niceness value is ... |
To my knowledge, the Linux kernel does not change the niceness of a process, and I fail to see why it would since it doesn't have to to lower the priority of a process. The niceness is an information given to the kernel, telling it how nice that process is willing to be. The kernel scheduler is free to take this infor... | Does Linux Change a Process Niceness Automatically? |
1,394,619,078,000 |
I understand how ionice can help you when you have multiple processes requesting access to the same disk resources, but how does it work when you have multiple disks?
For example, you have one rsync operation moving data from Drive A -> Drive B, and another rsync moving data from Drive C -> Drive D.
In theory, since ... |
On Linux, drives are scheduled independently from each other. You can even set the IO scheduling algorithm to be different for different drives on the same system, by writing to /sys/block/<device>/queue/iosched.
The bandwidth between memory and the disks can indeed become a bottleneck. This is why hardware RAID make... | How does ionice work with multiple drives? |
1,394,619,078,000 |
While seeing the manual for swapon command the priorty option is described as
-p, --priority priority
Specify the priority of the swap device. priority is a value
between -1 and 32767. Higher numbers indicate higher
priority. See swapon(2) for a full description of swap
... |
man 2 swapon describes priorities thus:
Each swap area has a priority, either high or low. The default priority is low. Within the low-priority areas, newer areas are even lower priority than older areas.
All priorities set with swapflags are high-priority, higher than default. They may have any nonnegative value ... | What is swap priority and why does it matter |
1,394,619,078,000 |
The CFQ IO scheduler supports priorities though I am not sure that Deadline does (I believe not). The premise is that when I renice a task it gets a larger share of CPU under the Completely Fair Scheduler. Since this task is likely to run more often it would call for IO more often as well when needed, correct?
I am wo... |
Disk and memory scheduling are entirely different. In the absence of an IO priority scheduler, IO will be handled on a first come first served basis. If the system is IO bound, then all processes run in a more or less round robin basis until all are waiting for I/O. The nice priority of a process will have little im... | Does IO prioritise by the very nature of renicing a task? |
1,394,619,078,000 |
How to properly identify real-time processes currently occupied CPU queue and count them using ps? I know there is a bunch of fileds like prio,rtprio,pri,nice but do not know correct to use. It seems I need use something like ps -eo rtprio,prio,cpu,cmd --sort=+rtprio to get full list, but it do not seems for me right ... |
A list of non-zero CPU % processes:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm --sort=+pcpu | awk '$8!=0.0 {print}' | awk 'NR>1'
To count them
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm --sort=+pcpu | awk '$8!=0.0 {print}' | awk 'NR>1' | wc -l
To see this continuously updated,... | How to sort ps output to find processes realtime priority and identify processess currently occupied running queue |
1,394,619,078,000 |
I am doing a build on a Linux machine with Ubuntu 10.04 on it. How can I really speed up my build? I have 4 CPUs and lots of RAM. I already reniced the process group to -20. Is there something else I can do?
|
Most software build processes use make. Make sure you make make use the -j argument with a number usually about twice the number of CPUs you have, so make -j 8 would be appropriate for your case.
| How to speed up my build |
1,394,619,078,000 |
Does anyone know if it's possible to execute and renice a process in one command, i.e. without having to look up the command in the list of processes using the ps command and then renice that particular pid.
|
As I mentioned, @glenn-jackman gave you the answer. But just to elaborate a bit more, if you wish to give higher priority to the command but do not intend to run it as root, you could use a function (and sudo):
nice_cmd() {
PRIORITY=$1 ; shift
CMD=$1 ; shift
${CMD} $@ & cmdpid=$!
sudo renice -n ${PRIORITY} -p ... | Execute and renice a process in one command |
1,394,619,078,000 |
I was trying to change linux process priority using chrt. I changed priority of one process to SCHED_FIFO from SCHED_OTHER. I could see some improvement in the perfomance. I run linux angstrom distribution for my embedded system.
So if I use SCHED_FIFO for one process, how other process will get affected? What are th... |
As explained in sched_setscheduler(2), SCHED_FIFO is RT-priority, meaning that it will preempt any and all SCHED_OTHER (ie. "normal") tasks if it decides it wants to do something.
So, you should be absolutely sure it is well written and will yield control periodically by itself, because if it decides not to (eg. it wa... | SCHED_FIFO and SCHED_OTHER |
1,394,619,078,000 |
In some devices the cpu speed is dynamic, being faster when there is more load.
I was wondering if it is possible to set nice level or priority of a process so that it does not influence an increase in cpu speed when it is running flat out.
i.e.
Process is running flat out, but only using spare cpu cycles as low prior... |
You can use the ondemand cpu-freq governor, as long as you set the ignore_nice_load parameter to 1.
From Documentation/cpu-freq/governors.txt, ondemand section:
ignore_nice_load: this parameter takes a value of '0' or '1'. When
set to '0' (its default), all processes are counted towards the
'cpu utilisation' valu... | Process priority and cpu speed |
1,394,619,078,000 |
Can someone explain how "real" process priority (i.e. pri_baz field of ps) is calculated?
My guess is:
pri_baz = 99 - static_priority # if static_priority > 0 (real-time process)
pri_baz = 100 + min(20 + nice + dynamic_adjustment, 39) # if static_priority = 0 (time-shared process)
This is supported by the following... |
In ps’s output, pri_baz is calculated as pp->priority + 100, and pp->priority is the prio value from the kernel. This is described as
Priority of a process goes from 0..MAX_PRIO-1, valid RT
priority is 0..MAX_RT_PRIO-1, and SCHED_NORMAL/SCHED_BATCH
tasks are in the range MAX_RT_PRIO..MAX_PRIO-1. Priority
values... | How is process priority calculated? |
1,394,619,078,000 |
I understand that, for scheduling purposes, Linux processes have a "nice" value and a real-time priority value and that these can be explicitly altered with the nice and chrt commands. If the user does not explicitly set the real-time priority of a process, how is it set?
|
To quote Robert Love:
The scheduler does not magically know whether a process is
interactive. It requires some heuristic that is capable of accurately
reflecting whether a task is I/O-bound or processor-bound. The most
indicative metric is how long the task sleeps. If a task spends
most of its time asleep it ... | How is the real-time priority of a process set by default? |
1,394,619,078,000 |
I have 2 threads, each set to a different real-time priority using SCHED_FIFO. Thread throttling has been disabled, so theoretically the highest priority thread should be able to use 100% of CPU resources, preventing lower priority threads from ever running. If I create a tight infinite loop in the lower priority thr... |
In our Linux system, without our application running, the "ktimersoftd" thread is the highest priority, with a real-time priority of 1. However, our application, along with the third-party-libraries we were utilizing, all created higher priority real-time threads, preempting "ktimersoftd". It turned out that one of th... | Lower priority thread appears to block higher priority thread? [closed] |
1,394,619,078,000 |
I have a piece of C++ code that runs just fine when I run it from a Linux terminal, but which throws an EPERM error when run from a SystemV (init.d) script on bootup. The error comes from a pthread_create with the following bit of attributes assigned to the thread attempting to be created:
pthread_t reading_thread;
p... |
The answer seems to have been to put the following in my init.d script, which I put just before the start-stop-daemon calls in do_start:
ulimit -r ## (where ## is a sufficiently high number; 99 works)
The way I was able to determine this was by making system calls to ulimit -a inside of a bash command inside of my co... | realtime pthread created from non-realtime thread with init.d |
1,394,619,078,000 |
I'm running a raspbian (based on debian). I want to change the priority of the init services so the very first script which is run by init is one made for me. How can I do it?
On runlevel S I have 3 scripts with priortity 01: hostname.sh, fake-hwclock and mountkernfs.sh. If I just put my script on runlevel S with pr... |
The init scripts on /etc/init.d/ specify some information on it's LSB header, which in essence are just some lines at the beginning of the script. The field "Required-Start" of some script allows you to specify services that must be initialized before this script. insserv automatically add init scripts regarding LSB ... | Change init scripts priority |
1,394,619,078,000 |
I have the below output from top command. Where is the process priority of the processes?
Mem: 678048K used, 336240K free, 0K shrd, 4K buff, 523012K cached
CPU: 0.5% usr 26.1% sys 0.0% nic 72.9% idle 0.0% io 0.0% irq 0.4% sirq
Load average: 1.89 1.75 1.62 3/154 3595
PID PPID USER STAT VSZ %VSZ CPU %CPU C... |
It is called the nice value, and is shown by default in some of the configurations of top. If it is not showing by default, you can do the following
Execute top
Press f
Navigate to the line beginning with NI and press Space
Press q to return to the main view.
This is documented in sections 3a and 3b of the manpages ... | How to change order to process priority on top command? |
1,412,280,364,000 |
Is it possible to open an incognito session in bash?
For example, when we need to enter passwords in commands and don't want bash to add them to history.
|
When you want bash to stop logging your commands, just unset the HISTFILE variable:
HISTFILE=
All further commands should then no longer be logged to .bash_history.
On the other hand, if you are actually supplying passwords as arguments to commands, you're already doing something wrong. .bash_history is not world-rea... | How do I open an incognito bash session? |
1,412,280,364,000 |
I want to see a list of all outgoing HTTP requests from my desktop. I think it should be possible to monitor HTTPS hostnames as well for local clients using Server Name Indication (SNI).
OS X has a nice GUI utility called Little Snitch, which is a per-app HTTP monitor and firewall rule front-end.
I would settle for a ... |
You can use lsof and watch to do this, like so:
$ watch -n1 lsof -i TCP:80,443
Example output
dropbox 3280 saml 23u IPv4 56015285 0t0 TCP greeneggs.qmetricstech.local:56003->snt-re3-6c.sjc.dropbox.com:http (ESTABLISHED)
thunderbi 3306 saml 60u IPv4 56093767 0t0 TCP greeneggs.qmetricstech.local:3... | Monitor outgoing web requests as they’re happening |
1,412,280,364,000 |
I'm using:
thunderbird-10.0.3-1.el6_2.x86_64 on Scientific Linux 6.1
and if I send an e-mail (with Gmail) from my Thunderbird then I can see that the e-mail I sent contains a very-very bad thing:
Received: from [192.168.1.142] (31-149-121-34.pool.myisp.com. [31.149.121.34])
So ALL the e-mail that I'm sending contai... |
You cannot hide your public IP address (assigned to the WAN interface of your router). You can, however, hide your private IP address (assigned to the NIC of your computer):
Go to Thunderbird's about:config page (in version 3.1 it's Edit > Preferences > Advanced > General > Config Editor).
Find the mail.smtpserver.d... | How to remove the "Received: from" from an e-mails source? |
1,412,280,364,000 |
I have a set of SSH keys to login to accounts and servers. However, ever since I moved my main work profile to a USB drive (for sync and ease of use among other reasons) I have been unable to directly use the SSH keys in the profile for authentication, having to create local copies instead.
Normal SSH workflow usually... |
ssh-add doesn't have an option to bypass its check of the key permissions. You could recompile the program and disable the check.
A bindfs should work. You don't need to mount it at ~/.ssh, mount it at a special-purpose location and write a script that does ssh-add ~/.ssh-private-keys-bindfs.
Note that ssh is right in... | SSH using keys in external storage - permissions? |
1,412,280,364,000 |
If I tell applications like VLC or Audacity to record from my webcam or microphone, they just wake the hardware if sleeping and do their work without my interference.
Although this is a good thing, I've always wondered, due to privacy concerns: is there a way to restrict applications access to a hardware device?
While... |
I guess the traditional way would be to make pseudo-users (like the games-user) for the program/set of programs, assign this user to the groups for devices it should access (eg. camera), and run the program(s) SUID as this user. If you removed permissions for "others" (not owner or group), only the owner and members ... | Restrict applications to access certain hardware (webcam, microphone...) |
1,412,280,364,000 |
How can I safely access "my" web services and accounts in a computer in which I do have sudo rights but the administrator(s) have, naturally, remote root access as well?
Details
I use a dekstop which is connected to a (large) closed/restricted LAN. Even log-in to the system is only successful if connected to the LAN.
... |
You can't.
The root user has full access to the machine. This includes the possibility of running keyloggers, reading any file, causing the programs you run to do things without showing them in the user interface... Whether this is likely to happen depends on your environment so we can't tell you that. Even 2FA isn't ... | How can I protect my user passwords and passphrase from root |
1,412,280,364,000 |
How to clear the last -10 information only for a Linux system? I tried to execute the command > /var/log/wtmp to clear the last info, but it clears the whole login info , but I need to clear only last -10 login info.
|
The wtmp file is a sequence of struct utmp records. To remove the last 10 records, you first discover the size of a utmp record, then you truncate the wtmp file to its current size minus the ten times the size of a utmp record.
A simple C program will give you the size of a utmp record.
#include <utmp.h>
#include <st... | How to clear the last -10 info? |
1,412,280,364,000 |
I created an encrypted volume with LUKS and uploaded it to a remote directory on an untrusted host.
I can mount it locally though. I first mount the remote directory locally with sshfs and then open my volume with cryptsetup as if it were a local file.
$ sshfs user@host: remote/
# cryptsetup luksOpen remote/disk.img ... |
The remote host sees nothing but the (encrypted) reads and writes to the file.
| Are remote LUKS volumes mounted locally with sshfs made visible to remote users? |
1,412,280,364,000 |
Thunderbird pats itself on the back for not loading external content and protecting your privacy, but at the same time has a bright yellow notification bar tempting you constantly to do exactly that:
There is a description of how to make that notification bar go away in Windows here. They want you to create a file ca... |
In Linux, userChrome.css needs to be created in ~/.thunderbird/blahblah.default/chrome, where blahblah.default is replaced with the name of your actual profile folder in ~/.thunderbird.
Just tried it on my install, and it works as expected.
| remove the remote content warning in thunderbird |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.