date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,394,770,849,000 |
I have an array of values v that I want to remove from the file f. f is NUL delimited. How do I proceed? I tried using sd, but it didn't work.
Example:
I have this file:
# cat -v $attic
^@this is 1.
this is 2.
this is 3.
^@hi
^@blue boy
And this variable $i:
# cat -v <<<"$i"
this is 1.
this is 2.
this is 3.
I want ... |
Since you mention zsh, you could do:
zmodload zsh/mapfile
mapfile[$attic]=${(pj:\0:)"${(0@)mapfile[$attic]}":#$i}
$mapfile in the zsh/mapfile module is a special associative array that maps file names to their content.
"${(0@)var}": splits $var on NULs (and with @ inside quotes preserves empty elements like "$@").
$... | Remove values from NUL separated file |
1,394,770,849,000 |
Based on this, amongst many other things I've read, my understanding is that a='' makes a both null and zero-length. But, then, how does one create a zero-length, non-null string? Or, is there no such thing? To the extent this is shell-dependent, I'm working in bash.
|
"A null string" means "a zero length (empty) string". See e.g. the POSIX definition of "null string". This means that there is no such thing as a non-null zero length string.
However, there is such a thing as an unset variable.
var=''
unset uvar
There's now a difference between var and uvar after running the above ... | How to assign a zero-length, non-null string |
1,394,770,849,000 |
I'm trying to test some nameservers against a domain name.
For that, I created a script that reads a list of nameservers and asks for a domain name.
Something basic like this:
#!/bin/bash
domain=$1
[ -z $domain ] && read -p "DOMAIN NAME: " domain
namefile="./nameserver"
echo "RESULT - NAMESERVER DOMAI... |
I think I understand what's the issue now. Actually... Not an issue, a behavior.
If I intentionally input an invalid option, Dig gives me a syntax error.
$ dig @8.8.8.8 google.com -A
Invalid option: -A
Usage: dig [@global-server] [domain] [q-type] [q-class] {q-opt}
{global-d-opt} host [@local-server] {loc... | Error redirection fail with bind - dig |
1,394,770,849,000 |
I'd like to kill a process with a long name that ends with foo. Currently my plan is to use pkill (though for testing, to be friendly to the process, I've been checking my patterns with pgrep instead). I've seen this question that shows that for long process names, you must use -f to get the whole command line. The wo... |
pgrep -f matches on the concatenation with SPC characters of the arguments passed to the last command the process executed (as seen in /proc/pid/cmdline on Linux). That never contains NUL characters.
So you'd need to do:
pgrep -f '^[^ ]*foo( |$)'
Though you'd miss the processes that have executed some command with /p... | how to write a pgrep pattern that (never) matches a zero byte? |
1,394,770,849,000 |
I've got a file of data from a prototype hardware RNG, however, for some reason it's producing a lot of 0x00 bytes. I want to delete all of these 0x00 bytes so I can test if the rest of the data is random.
How would I go about doing this in the terminal?
|
tr -d '\0' <file >newfile
This deletes all nul bytes in the file file and saves the modified data in newfile.
| Remove all zero bytes from file in Unix |
1,394,770,849,000 |
Tried echo "Some text" >> /dev/null
then cat null with no output. Can someone explain why this is?
|
The null device acts like a black hole. Anything written to it is discarded, and if you try to read from it you receive an end-of-file immediately.
It is used to discard unwanted output and to provide null input.
Without it, it would be very hard to discard unwanted output. Basically, you would have to store the unwan... | What happens when you write to /dev/null? What’s the point? [duplicate] |
1,394,770,849,000 |
I have a 10Mb file filled by null bytes. A program is accessing it and changes zeros to specific strings up to the end of the file.
I've tried to use tail -F | grep wanted_text | grep -v "unwanted_text", but it does not monitor changes. It only works for usual text files, but not for files filled by zeros.
All null by... |
This is the script for Reader, which should be close to what you need to fake a tail command for a NUL-filled file. It checks for changes in the file (by comparing the whole ls -l output, which includes a timestamp down to nanoseconds), and reports any additions in a batch. It does not report lines that are already in... | How to monitor changes in file filled by null bytes? |
1,394,770,849,000 |
I'm curious why this special device is needed to fork the command and run it asynchronously in the minimal Busybox shell.
BusyBox v1.30.1 (Debian 1:1.30.1-4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
/bin/sh: can't access tty; job control turned off
/ #
/ # echo Hello && sleep 2s && echo Worl... |
From the implementation of the shell in busybox:
/*
* Fork off a subshell. If we are doing job control, give the subshell its
* own process group. Jp is a job structure that the job is to be added to.
* N is the command that will be evaluated by the child. Both jp and n may
* be NULL. The mode parameter can be... | Why is /dev/null needed to run asynchronous jobs in busybox sh? |
1,394,770,849,000 |
In the example, why xargs -0 adds an extra blank line, and how to avoid it?
$ touch a b c
$ find . -print0
../a./c./b
$ find . -print0 | sort --zero-terminated | xargs -0
. ./a ./b ./c
$ find . -print0 | sort --zero-terminated
../a./b./c$
Note that the last output is ../a./b./c$ i.e. the $ sign for input is on the... |
Because xargs -0 == xargs -0 echo where the default echo will print new line at the end of a string,
You can achive the same output with -n
find . -print0 | sort --zero-terminated | xargs -0 -n1 echo -n
| Why xargs -0 adds an extra blank line? |
1,394,770,849,000 |
I have very simple command which generating STDOUT which i want to do /dev/null but somehow it's not working or i am missing something here.
$ ldapsearch -Y GSSAPI -b "cn=users,cn=accounts,dc=example,dc=com" "uid=foo" | grep krbPasswordExpiration | tail -n1 | awk '{print $2}'
SASL/GSSAPI authentication started
SASL u... |
You need to be aware of what command is doing the output to stderr and make sure the redirection is associated with that command.
You can think of pipes as having ( ) around the commands
So
a | b | c
can be thought of as
( a ) | ( b ) | (c )
(That's not literally how it works, but it's a mental model).
And the redir... | command stdout to /dev/null |
1,394,770,849,000 |
My logs nohup.out is owned by root user while I m trying to rotate the logs using system which has privileged access using sudo
I have written the below script to rotate logs.
cat rotatelog.sh
cp /var/www/html/nohup.out /var/www/html/nohup.out_$(date "+%Y.%b.%d-%H.%M.%S");
sudo tee /var/www/html/nohup.out;
The issue... |
tee will block waiting for standard input.
If your system provides the truncate command, you can try
sudo truncate -s 0 /var/www/html/nohup.out
Otherwise, you could do something like
: | sudo tee /var/www/html/nohup.out
to supply tee with an empty stdin.
| Trying to rotate logs however tee command fails to return after execution |
1,417,509,861,000 |
Using pacemaker in a 2 nodes master/slave configuration.
In order to perform some tests, we want to switch the master role from node1 to node2, and vice-versa. For instance if the current master is node1, doing
# crm resource migrate r0 node2
does indeed move the resource to node2. Then, ideally,
# crm resource migra... |
I know this bit old; but it seems like no one answered this satisfactorily, and the requester never posted if his problem was solved or not.
So here is an explanation.
When you perform:
# crm resource migrate r0 node2
a cli-prefer-* rule is created.
Now when you want to move the r0 back to node1, you don't do:
# crm ... | Pacemaker: migrate resource without adding a "prefer" line in config |
1,417,509,861,000 |
I have recently installed pacemaker and corosync for managin a virtual IP.
The thing is that when I want to stop a resource (Virtual IP) on all the nodes, the stop command hangs.
[root@isis ~]# sudo pcs cluster stop --all
isis: Stopping Cluster...
My configuration is:
[root@isis ~]# sudo pcs status
Cluster name: clus... |
If your goal is to just stop the resource from running on any nodes in a cluster then you'd want to disable that resource using:
pcs resource disable ClusterIP-01
Your command sudo pcs cluster stop --all would be shutting down the cluster itself (and any resources controlled by that cluster).
Managing Cluster Resource... | pacemaker hangs while stopping |
1,417,509,861,000 |
I have a group in Pacemaker which I need to start last. Ideally I'd like to know how to configure groups to start in an specific order, but I can't seem to figure it out, not sure if its possible. Seems like it should be, I love using groups as it helps me organize and makes reading what's going on in the config much ... |
You're using the wrong action in your ordering constraint. 'promote' should only be used on Master/Slave resources, use 'start' on your groups.
pcs constraint order start SQL-Group then ASTERISK-Group
| Pacemaker Promote Groups in Specific Order - Or Specify start last |
1,417,509,861,000 |
So I have gotten to the point where I had all services running when I configured the cluster, but after reboot I am getting the following :
Full list of resources:
virtual_ip (ocf::heartbeat:IPaddr2): Started node1
webserver (ocf::heartbeat:apache): Stopped
Master/Slave Set: WebDataClone [Web... |
I don't see mysql defined in the Pacemaker; are you starting it manually after the cluster starts or does it start at boot?
If it's starting at boot, it could be starting before Pacemaker, and therefore holding a lock on the mountpoint (where it's data should be) which would cause the Filesystem resource to not be ab... | MySQL DRBD Resource failing to start PaceMaker + Corosync |
1,417,509,861,000 |
I have configured a two node physical server cluster (HP ProLiant DL560 Gen8) using pcs (corosync/pacemaker/pcsd). I have also configured fencing on them using fence_ilo4.
The weird thing will happen if one node goes down (under DOWN i mean power OFF), the second node will die as well. Fencing will kill itself causing... |
It looks like you have the STONITH devices configured to be able to fence both nodes. You also do not have location constraints keeping the fence agents responsible for fencing a given node from running on that same node (STONITH suicide), which is a bad practice.
Try configuring the STONITH devices and location const... | PCS Stonith (fencing) will kill two node cluster if first is down |
1,417,509,861,000 |
I know crm utility command has been people's preferred method to manage clusters when it comes to High Availability with corosync & pacemaker. Now, its been deprecated and we are told to work with pcs utility commands which suppose to do all sort of things that we used to do with crm.
Now what I am troubling with is t... |
Are you sure? I have it in PCS version 0.9.158 (CentOS 7.4):
# pcs node attribute --help
Usage: pcs node <command>
attribute [[<node>] [--name <name>] | <node> <name>=<value> ...]
Manage node attributes. If no parameters are specified, show attributes
of all nodes. If one parameter is specified,... | Corosync/Pacemaker pcs equivalent commands to crm |
1,417,509,861,000 |
I am having an error starting corosync on a cluster member:
May 16 00:53:32 neftis corosync[19741]: [MAIN ] Corosync Cluster Engine ('2.3.4'): started and ready to provide service.
May 16 00:53:32 neftis corosync[19741]: [MAIN ] Corosync built-in features: dbus systemd xmlconf snmp pie relro bindnow
May 16 00:53:3... |
Do the hostnames you have listed in your Corosync configuration resolve correctly? I would start by verifying that.
# host isis.localdoamin
Since, "domain", appears to be spelled incorrectly (or in a language I am ignorant of), I am going to guess that command fails? ;-)
Also, you could use the short hostname (witho... | Corosync error "No interfaces defined" in a cluster member |
1,417,509,861,000 |
Ok so I have gotten fairly far into the configuration successfully, the two nodes have authenticated each other and all is well, but when I try to add the virtual_ip it never starts.
What i've used so far is not really relevant, but my write up (wip) is here, i just don't want to make this post look larger then it nee... |
The guide doesn’t have you add nic=eno### to this command, but it failed for me if I didn’t use it.
You can find your device number via the following command
cat /etc/sysconfig/network-scripts/ifcfg-e* | grep DEVICE
Mine is eno16777984 so this is my example command.
pcs resource create virtual_ip ocf:heartbeat:IPaddr... | Trouble Creating Virtual_IP for PaceMaker + Corosync - CentOS 7 |
1,417,509,861,000 |
I am having trouble setting up a Virtual/Floating IP. In this specific circumstance I am using Pacemaker+Corosync to manage 2 Virtual IP's. One is internal and the other is external to our SIP Trunk. VOIP Asterisk/FreePBX.
The issue seems to be that our SIP Trunk is seeing the packets coming from the IP that is regist... |
I had a similar issue with an IAX2 trunk in a Pacemaker HA setup. The solution is not to disable the primary IP address of the NIC, but rather to source all traffic from the virtual IP address. There is even a pacemaker resource agent just for this. The ocf:heartbeat:IPsrcaddr.
For example I have a virtual (secondary)... | IP Source Address issues with PaceMaker Virtual IP |
1,417,509,861,000 |
I have a configuration with 5 nodes, 4 able to host resources and 1 resource. What I want to do is to make the resource stop completely after migrating N times from node to node.
So a sample scenario would be: resource VIP1 running on node one; its monitor fails, migration-threshold is reached, it moves to node two; t... |
That is definitely an interesting use case, thanks for sharing...
While you're VIPs are getting DDoS'd they probably can't ping out reliably. Perhaps you might take a look at the 'ping' resource-agent for Pacemaker.
The clusterlabs documentation mention it briefly here:
http://clusterlabs.org/doc/en-US/Pacemaker/... | Pacemaker: stopping resource after it migrate N times due to failover |
1,417,509,861,000 |
I get this Error after finishing configuring cluster. And after trying to fail-BACK from node2
mysql_service01_monitor_20000 on node1 'not running' (7): call=20, status=complete, exitreason='none'
shutdown cluster & restart mariadb
pcs cluster stop --all
service mariadb restart
service mariadb stop
pcs cluster sta... |
Groups imply both ordering and location. So your group is saying, "start mysql, then mount the filesystem, then start the VIP". Not only is this incorrect ordering, but it is contradicting your ordering constraints.
You should just put everything in the group besides DRBD, and then place a single ordering and single ... | MySQL Server monitor_20000 on node1 'not running' - HA Cluster - Pacemaker - Corosync - DRBD |
1,417,509,861,000 |
I upgraded my servers. Then I started corosync service one by one on my servers. I started first on 3 server and I wait 5 min. Then I started next 4 corosync on other servers and 7 server crashed in same time.
I'm using corosync since 5 years. I was using;
Kernel: 4.14.32-1-lts
Corosync 2.4.2-1
Pacemaker 1.1.18-1
a... |
After downgrade to "corosync 2.4.2-1" problem solved.
Why you guys vote "-" for the topic? It was so clear and like you see it was corosync's fault or the arch builder.
What ever if you living the problem just downgrade and save your time.
| When I start corosync all servers panics with core dumps |
1,417,509,861,000 |
I am getting the following error when trying to set the Primary node for DRBD.
'node1' not defined in your config (for this host).
I know this is related to DNS/Hostname/Hosts and the config clusterdb.res. I know this because I originally got an error when trying to start clusterdb.res if node1 didn't resolve correct... |
You're not using the drbdadm command correctly. It wants the resource name, where you're giving it a node name.
Try this instead (from node1):
drbdadm up clusterdb
drbdadm primary --force clusterdb
As a side note, DRBD expects the hostnames in its config to be the same as uname -n.
| DRBD - 'node1' not defined in your config (for this host) - Error when setting Primary |
1,417,509,861,000 |
I have a 2 node cluster on RHEL 6.9. Everything is configured except I'm having difficulty with an application launched via shell script that created into a service (in /etc/init.d/myApplication), which I'll just call "myApp". From that application, I did a pcs resource create myApp lsb:myApp op monitor interval=30s o... |
My guess would be that your shell/init script is not returning the proper return codes. In order for pacemaker to play nicely with an init script that init script needs to be fully LSB compliant. Run the init script though the compatibility checks here: http://www.linux-ha.org/wiki/LSB_Resource_Agents
I suspect your s... | RHEL High-Availability Cluster using pcs, configuring service as a resource |
1,417,509,861,000 |
node $id="10" db10 \
attributes standby="off"
node $id="9" db09 \
attributes standby="off"
primitive drbd_jenkins ocf:linbit:drbd \
params drbd_resource="r0" \
op start interval="0s" timeout="60s" \
op stop interval="0s" timeout="60s"
primitive jenkins lsb:jenkins \
op monitor interval="15s" \
... |
Your colocation constraint is incorrect. You're telling the cluster that DRBD must be Master where jenkins_group is started.
Use the following constraints instead:
colocation cl_jenkins-with-drbd inf: jenkins_group ms_drbd_jenkins:Master
order o_drbd-before-jenkins inf: ms_drbd_jenkins:promote jenkins_group:start
Pro... | Pacemaker doesn't failover |
1,417,509,861,000 |
I have a drbd + pacemaker cluster with three nodes, one being a quorum device only. I'm trying to configure the pacemaker resource so that the promotable drbd-resource should run on all three devices, but it should never be promoted on the quorum device. I've tried setting location constraints on the resource, but tha... |
Using a simple location constraint isn't enough for this task. Pacemaker rules can handle more advanced expressions needed for this.
Depending on the RHEL/Pacemaker version one of these rules should work for you:
# pcs constraint location <clone> rule role=promoted score=-INFINITY node eq <quorum-node-name>
# pcs con... | Prevent promotion on specific node in Pacemaker |
1,417,509,861,000 |
I'm planning to use pacemaker with corosync and pcs to provide HA in a active-passive cluster for our two front end servers serving a perl application. I have configured resources for the service IP, Apache the application daemon and what I still need to do - configure replication. That means, I need to configure repl... |
DRBD should work for this. There are plenty of tutorials out there describing how to configure a Pacemaker, Corosync, and DRBD cluster stack.
DRBD replicates an entire block device, so you'd either add an additional disk to your VMs, cut some extra space out of an LVM volume group for a new LV, or partition your disk... | data sync in a active-passive pacemaker cluster |
1,417,509,861,000 |
According to redhat's official documentation, all resources in a resource group implicitly have colocation and order constraints. But from the tests i did in my lab setup i can't see any constraints and resources in the same resource groups are started on different nodes.
[root@node1 conf]# pcs status
Cluster name: my... |
From the resources indentation it appears that the resource webfs is not in fact a member of the group myweb. You can verify this using pcs status groups.
You can add the webfs resource to the myweb resource group using pcs resource group add myweb webfs
PS: This is clearly a web server resource group, so you have to ... | Are there implicit constraints for resource groups in a pacemaker cluster? |
1,417,509,861,000 |
A simple and fast question about pcs.
With this command
pcs resource create NameService named op monitor interval=30s
I create a resource named,wich is working,but if i want to run named -u named -t /var/chroot instead of default named,how to create a resource with those options?
|
You can give the named resource agent a user via 'named_user', and you can pass other options via 'named_options':
pcs resource create NameService named named_user=named \
named_options="-t /var/chroot" op monitor interval=30s
Or you could try using the "anything" resource agent to feed options to named. It would... | PCS and corosync/pacemaker |
1,417,509,861,000 |
Migrating from Xen's xm to Xen's xl under control of libvirt, I wonder:
Where does libvirt store the "originals" of VM configurations?
I found that my PVM configurations are stored in /etc/libvirt/libxl/, but when viewing such files I see a comment saying that file has been created automatically and I should not be ed... |
I solved it in the way "I don't care any more":
I created an extra copy of the configurations that I edit any sync in /etc/xen/vm/.
As the cluster RA VirtualDomain creates the VM newly from the configuration file given, I just specify that copy, and so I don't have to care any more where libvirt stores the actual VM c... | Where are libvirt's VM definitions "originals" stored, and how to sync them across multiple nodes? |
1,539,212,834,000 |
Trying to automate making a ppp connection on boot. I have a cell modem (skywire LE910 SVG) that I have working manually using pon. My ppp/peers/isp is configured and the corresponding chatscript is working. After my device boots (beaglebone black running 3.8.13 Debian wheezy) I can run pon verizon (name of isp) an... |
Found an issue with the ppp/peers/provider file
Removing updetach from the provider file fixed it.
updetach
With this option, pppd will detach from its controlling terminal once it has successfully established the ppp connection (to the point where the first network control protocol, usually the IP control protoc... | Establish a PPP connection on boot |
1,539,212,834,000 |
I'm trying to connect to GPRS network through a serial port connected GSM modem.
When I call /usr/sbin/pppd call <peer_name> from the command line, it correctly receives and handles Ctrl+C from keyboard.
But when I put the exact same command in an empty shell script (with or without the shebang #! at the top), chmod +... |
I guess the problem is a bug specific to pppd version 2.4.5, which is the one that comes with Debian 7. I tested versions 2.4.4 and 2.4.6 (which is the latest as of now) on the same and other machines and they work as expected. pppd package seems to have a lot of signal handler manipulation code in it, which I guess c... | Ctrl-C is ignored by pppd when put in a shell script |
1,539,212,834,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,539,212,834,000 |
I'm running Arch Linux, and recently updated the whole system.
Now I every time I connects to VPN with nmcli command, if it fails, I couldn't figure out the reason:
NetworkManager[15967]: <info> VPN plugin state changed: starting (3)
NetworkManager[15967]: <info> VPN connection 'XXX' (Connect) reply received.
NetworkM... |
Change the used loglevel in your NetworkManager.conf file
[logging]
This section controls NetworkManager's logging. Any settings here are
overridden by the --log-level and --log-domains command-line options.
level=<level>
One of [ERR, WARN, INFO, DEBUG]. The ERR level logs only cri... | How do I know why NetworkManager failed to initiate the VPN connection? |
1,539,212,834,000 |
I'm trying to setup a VPN over SSH using PPPD (following the Arch Wiki). The command given is:
/usr/sbin/pppd updetach noauth silent nodeflate pty \
"/usr/bin/ssh root@remote-gw /usr/sbin/pppd nodetach notty noauth" \
ipparam vpn 10.0.8.1:10.0.8.2
I have successfully managed to set it up with appropriate modific... |
Most probably /etc/ppp/ip-up.d is the location you are looking for.
My example is valid on Gentoo Linux but the same directory structure seems to exist on Arch.
Every time a VPN connection is made /etc/ppp/ip-up is run, which typically executes /etc/ppp/ip-up.d/* in turn. Its first argument is the attached pppn device... | How do I detect which device was recently created by pppd? |
1,539,212,834,000 |
We have a Telit LE910 connected to a Gumstix Overo SBC. The Overo is running Yocto Linux (Kernel 3.21)
We have managed to get most things working but we now have an issue with the PPTP client.
When we try to initialise the PPPd we get the following output:
root@overo:~# pppd call telstra
AT
OK
AT+CGDCONT=1,"IP","telst... |
After a lot of work, we have a working config and CHAT script.
I think the root cause is the lack of reception caused by a dodgy fly lead.
AT+CSQ
Will return the reception and the confidence figure (Lower is better for both). In the original log, this was 99,99.
With a different fly lead the following is returned.
+C... | PPPD on Yocto (Telit LE910 connecting to Telstra) |
1,539,212,834,000 |
I tried to configure AnyDATA ADU890-WH modem to work in Linux, but I have not succeeded. I am client of Czech carrier O2 and using Ubuntu 14.04.
I have once managed to connect using Network Center, Mobile Broadband tab - but since then I have not succeeded.
This is my wvdial.conf:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 ... |
By some trial and error, I found following section in my /etc/ppp/options:
# BSD licensed ppp-2.4.2 upstream with MPPE only, kernel module ppp_mppe.o
# {{{
refuse-pap
refuse-chap
refuse-mschap
# Require the peer to authenticate itself using MS-CHAPv2 [Microsoft
# Challenge Handshake Authentication Protocol, Version 2]... | wvdial: The PPP daemon has died: Pty program error (exit code = 9) |
1,539,212,834,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,539,212,834,000 |
This is related to a stackoverflow post I posted.
Basically I have a Python script that I'm running on an embedded system (Buildroot-based). The python script runs on startup, but I cannot guarantee that the internet connection will be up by then (based on pppd), because the unit might not be in an area with mobile ph... |
Most programs read the system DNS configuration (in /etc/resolv.conf) only once when they start up or when they make their first network access. They don't re-read the configuration if it changes.
It appears that on your system, the DNS configuration changes when the network goes up (probably changes from unconfigured... | Program cannot resolve host name if it's started before first successful internet connection |
1,539,212,834,000 |
I have an OperWRT router with OPenVPN and PPPD servers configured.
Network topology is like follow:
I have problem configuring PPPD to push routes B,C to A.
Client A, when connected to router via PPPD, has access to D, but not to B/C
On the other side machines on D network has access to B and C without any extra con... |
The only option that exists inside pptp(Client) is to enforce default route through ppp server:
And at the server there is no way to "push" routes the same way it can be done using an OpenVPN server. Microsoft KB
Taking a look at the How VPN Works page from Microsft it explicitly says that you will need to rely on ot... | PPPD access to networks behind router [closed] |
1,539,212,834,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,539,212,834,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,539,212,834,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,539,212,834,000 |
I'm designing some reporting system on Raspberry Pi system which connects to world thru 3G usb modem controlled by pppd.
99,999% of time connection works ok, but sometimes it drops and further reconnect attempts fail unless modem is re-plugged physically.
As in production box will work remotely with no physical access... |
Bingo!
Put 'nodetach' as command-line argument to pppd and daemon will not fork itself. All is needed then is standard 'echo $?' in next line of script:
pppd call my_provider nodetach maxfail 3
echo $?
| get pppd exit code - how? |
1,539,212,834,000 |
I am running NetBSD 6.1.4, and I have an stunnel instance with the following configuration:
[https service]
accept = 443
CAfile = /u01/usbtether/CA/certs/rootCA.crt
cert = /usr/pkg/etc/stunnel/stunnel.pem
pty = yes
exec = /usr/sbin/pppd
execargs = pppd call phone
verify = 2
client = no
Everything works nicely, except... |
The problem was that I forgot to include ",pty" as an option for EXEC:"/usr/sbin/pppd ..." so pppd was silently crashing.
| How to capture data transferred on a PTY? |
1,539,212,834,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,539,212,834,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,539,212,834,000 |
So I've been pulling my hair this weekend. I've been trying to connect to a VPN server. I could do it successfully at my office using Windows, but I can't do it in my house using OpenSUSE. Here's the setup in my Linux box :
# This module isn't loaded initially
modprobe nf_conntrack_pptp
pptpsetup --create my_vpn --ser... |
I don't really understand, but :
modprobe nf_conntrack_pptp
and opening VPN via the GUI, instead of terminal, does the job :-/
| VPN Client in OpenSUSE |
1,402,461,170,000 |
I cannot connect to my PPTP VPN server, even though the CHAP authentication succeeds.
This is from /var/log/syslog:
Jun 11 07:27:22 aspire pppd[32221]: CHAP authentication succeeded
Jun 11 07:27:22 aspire pppd[32221]: LCP terminated by peer (MPPE required but cannot negotiate MPPE key length)
Jun 11 07:27:22 aspire pp... |
I found the answer, I had to enable Point-to-Point encryption(MPPE) in the Advanced Settings dialog. Now it works.
| PPTP VPN error: LCP terminated by peer |
1,402,461,170,000 |
If my machine (OSX 10.9.2) is not connected to the Internet and I want to establish pptp connection by using pppd:
$ sudo /usr/sbin/pppd serviceid 5BE14D3A-7B94-4704-ADE0-9883B189199E debug logfile /tmp/ppp.log plugin /System/Library/SystemConfiguration/PPPController.bundle/Contents/PlugIns/PPPDialogs.ppp plugin pptp.... |
In the OSX 1.9 pppd source code, I found this in Helpers/pppd/pppd.h:
#ifdef __APPLE__
#define EXIT_TERMINAL_FAILED 20
#define EXIT_DEVICE_ERROR 21
#endif
#ifdef MAXOCTETS
#ifdef __APPLE__
#define EXIT_TRAFFIC_LIMIT 22
#else
#define EXIT_TRAFFIC_LIMIT 20
#define EXIT_CNID_AUTH_FAILED 21
#endif
#endif
#ifdef _... | Undocumented pppd exit code |
1,402,461,170,000 |
ORIGINAL:
I've just switched from an old Linux install (Debian squeeze) to a new one (Linux Mint 17.3) for my router (I am using a full desktop PC with a Linux install as my router). The Linux PC connects directly to my DSL modem and negotiates a PPPoE connection, then routes internet connections for all my other dev... |
In order for NAT to work, you need to have a protocol-specific helper module loaded. By default, you're only going to have ones for TCP and UDP loaded.
That's why you're seeing your PPTP traffic (which is actually PPP over GRE) escaping without NAT. That module is nf_nat_proto_gre, at least as of Linux 4.4.
A similar ... | PPTP VPN not working with Linux router |
1,402,461,170,000 |
I have Debian 8.0.0-64 running on my server, which has eth1 as the interface with the default gateway. eth0 is pointing to the internal network.
root@server:/home/user# ifconfig
eth0 Link encap:Ethernet HWaddr 06:46:7e:88:72:d7
inet addr:10.168.118.205 Bcast:10.168.118.255 Mask:255.255.255.192
... |
To achieve what I wanted to achieve I had to do the following things:
Step 1: Install the PPTP Client Program for Debian Project
Step 2: Setup the PPTP connection
Step 3: Testing the connection
Step 4: Adding the route
Step 5: Final check
For the first three steps, I mainly followed http://pptpclient.sourceforge.net/h... | Enabling an Internet route through ppp0 |
1,402,461,170,000 |
I'm running Arch Linux, and recently updated the whole system.
Now I every time I connects to VPN with nmcli command, if it fails, I couldn't figure out the reason:
NetworkManager[15967]: <info> VPN plugin state changed: starting (3)
NetworkManager[15967]: <info> VPN connection 'XXX' (Connect) reply received.
NetworkM... |
Change the used loglevel in your NetworkManager.conf file
[logging]
This section controls NetworkManager's logging. Any settings here are
overridden by the --log-level and --log-domains command-line options.
level=<level>
One of [ERR, WARN, INFO, DEBUG]. The ERR level logs only cri... | How do I know why NetworkManager failed to initiate the VPN connection? |
1,402,461,170,000 |
in windows you can simply create two pptp connections and after connecting to one of them, easily connect to the other one while maintaining the first.
Is there any way to do this (cli or gui) in linux?
I also found this resource, but found it rather unhelpful.
|
ok , i found a solution , i made the vpn connections with pptpsetup tool , and after editing /etc/ppp/peers/* , i connected to the first vpn through pon command or pppd call and routing my traffic through this connection (ppp0) (route add default dev ppp0) after that i connected to the second vpn (pppd call) and route... | VPN tunneling through another VPN |
1,402,461,170,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,402,461,170,000 |
After update to Fedora 25 one of my PPTP connections strangely works. Remote net is not available.
It is connected, successfully get remote net IP address. While connected nothing is available in remote net, but internet works fine. After a few minutes connection breaks by itself.
I've noticed strange thing, while ppt... |
Check this: http://pptpclient.sourceforge.net/howto-diagnosis.phtml#ip_loop.
NM (or pppd) is creating an additional, wrong, default route (even if nodefaultroute is being passed as parameter). route del won't delete it.
I got around it by telling NM the connection would be shared with other users.
It is most likely a ... | Fedora 25, pptp connects but not working, too many transferred packets |
1,402,461,170,000 |
I've set up a PPTPd server on an Ubuntu 18.04 machine with kernel 5.0x, am able to connect to it from a Win10 machine, ping the server and ping 8.8.8.8. So DNS works over VPN.
However, I'm not able to retrieve any web pages or connect to other ports.
I've done the modprobe things (nf_nat_pptp and nf_conntrack_pptp).
T... |
Definitely something wrong with iptables rules. I see a lot of overlapping. For example, take a close look at POSTROUTING chain. Rules #1, 2 and 3 are identical. Also, rules #6, 7 and 8 are identical.
Bear in mind that rules are processed from top to down. If you take another close look at POSTROUTING_ZONES chain. Rul... | PPTP VPN Ubuntu no web access |
1,402,461,170,000 |
I'm trying to setup a VPN connection on OpenSUSE Leap 42.2, with the following command:
me@linux-box:~> sudo pptpsetup --create TUNNEL --server 172.16.100.2 --username 444182 --password 255553 --start
But I'm receiving the following error message:
Using interface ppp0
Connect: ppp0 <--> /dev/pts/5
anon warn[open_in... |
Actually, I realized that the PPTP was disabled on MikroTik v6.25, i.e. IP address 172.16.100.2, that's why I couldn't connect to the VPN server.
After enabling the PPTP on MikroTik, I'm able to connect to the server like this:
me@linux-box:~> sudo pppd call TUNNEL debug nodetach
using channel 15
Using interface ppp... | Start a VPN connection with PPTP protocol on command line [closed] |
1,402,461,170,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,402,461,170,000 |
I am connected to a VPN network through a pptp connection. The target network does not provide Internet access, thus I can't connect to it.
How should I route my Internet traffic through my existing connection?
Below, are my existing routes
Destination Gateway Genmask Flags Metric Ref Use Iface
d... |
The answer is to setup a default route. I do this:
sudo ip route add default via 192.168.1.1 metric 40
where:
192.168.1.1 = local gateway (not VPN gateway)
metric 40 = Some metric that is lower than your existing default route
In simple steps:
Without being on VPN use ip route and note the line beginning with def... | Access internet when connected to VPN |
1,402,461,170,000 |
Any clue what is causing the ipsec0 interface to establish PTP and then adding a default route to the PTP?
It's borking my routing and I can't seem to find the culprit
I have no VPN profiles enabled, no VPN client running.
Recently removed ProtonVPN.
TunnelBlick installed but not running.
This seems to happen each ... |
This turned out to be a remnant config from a ProtonVPN uninstall. Here's the steps I followed to fix it (provided by ProtonVPN support):
- Download the latest ProtonVPN application version through the following link: https://protonvpn.com/download/ProtonVPN.dmg
- Install the application, login, establish a connection... | Mystery Interface and Routes on ipsec0, Catalina OSX |
1,402,461,170,000 |
I have an OpenVPN server running, clients can connect to it and access internet, but all of the clients get 10.8.0.6 ip address, so they can't ping each other.
I'm not sure, but I think that the issue might be in the routing on the server. The defaults that I have there are:
route
Kernel IP routing table
Destination ... |
One thing that can cause this is having multiple clients connected using the same certificate- the OpenVPN server sees them as the same client and so assigns them the same IP address.
If this is the case, you can make a unique certificate for each client, or add the duplicate-cn option to your options on the server, ... | OpenVPN server configuration |
1,402,461,170,000 |
I would like to set a container use the vpn for only network interface.
I have used the pptpsetup and pon make a pptp connection works, and got a ppp0 interface.
Now, I want all internet connection in the systemd-nspawn container go through the ppp0 .
How can I make it work?
|
systemd-nspawn --network-interface=ppp0
ppp0 will disappear from the host namespace. You can't share one IP address with a container and not your other IP addresses. (Apart from doing NAT).
It looks like this might require a very recent kernel though. http://www.spinics.net/lists/netdev/msg339236.html
OR (machine ... | How to use systemd-nspawn with pptp? |
1,402,461,170,000 |
So I've been pulling my hair this weekend. I've been trying to connect to a VPN server. I could do it successfully at my office using Windows, but I can't do it in my house using OpenSUSE. Here's the setup in my Linux box :
# This module isn't loaded initially
modprobe nf_conntrack_pptp
pptpsetup --create my_vpn --ser... |
I don't really understand, but :
modprobe nf_conntrack_pptp
and opening VPN via the GUI, instead of terminal, does the job :-/
| VPN Client in OpenSUSE |
1,402,461,170,000 |
I'm in China and trying to use expressvpn. openvpn doesn't work properly in the wifi, so the people from expressvpn told me to use a pptp-connection instead. I've set that up but I can't connect. When I click on connect I get the following message
Starting the service, that provides the VPN-connection, failed
Any id... |
PPtP creates a GRE tunnel after the authentication. GRE is a Point to Point (PtP) protocol.
If you have a private IP and the router is doing NAT (most probably the case), in order to establish the connection your router should support GRE (TCP Proto 47) passthrough.
If that is not enabled, you won't be able to conne... | PPTP-Connection not possible because required service can't start |
1,402,461,170,000 |
I use to establish a connection to my VPN PPTP server by typing:
pon MyVPN persist
I want to know the reconnection timing details, but I have not found documentation enough about it. Specifically:
- If there is a disconnection, does the PPTP client attempts to reconnect immediately?
- What is the frequency ... |
As far as i can see the reconnection is immediate (although it sometimes takes some time for it to detect that connection is broken).
I believe there's no lag between retries but you can set up it by using holdoff n where n is the number of seconds between the disconnection and next try to reconnect.
As for a number ... | What is the reconnection policy of "persist" switch on "pon" command from pptp-linux package? |
1,350,653,172,000 |
I would like to display the completion time of a script.
What I currently do is -
#!/bin/bash
date ## echo the date at start
# the script contents
date ## echo the date at end
This just show's the time of start and end of the script. Would it be possible to display a fine grained output like processor time/ io tim... |
Just use time when you call the script:
time yourscript.sh
| How to get execution time of a script effectively? |
1,350,653,172,000 |
This is a simple problem but the first time I've ever had to actually fix it: finding which specific files/inodes are the targets of the most I/O. I'd like to be able to get a general system overview, but if I have to give a PID or TID I'm alright with that.
I'd like to go without having to do a strace on the program ... |
There are several aspects to this question which have been addressed partially through other tools, but there doesn't appear to be a single tool that provides all the features you're looking for.
iotop
This tools shows which processes are consuming the most I/O. But it lacks options to show specific file names.
$ sudo... | Determining Specific File Responsible for High I/O |
1,350,653,172,000 |
I have several programs that I'm executing in a shell script:
./myprogram1
./myprogram2
...
I know that I can profile each individual program by editing the source code, but I wanted to know if there was a way I could measure the total time executed by profiling the script itself. Is there a timer program that I c... |
Start by using time as per Jon Lin's suggestion:
$ time ls test
test
real 0m0.004s
user 0m0.002s
sys 0m0.002s
You don't say what unix your scripts are running on but strace on linux, truss on Solaris/AIX, and I think tusc on hp-ux let you learn a lot about what a process is doing. I like strace's -c option... | How can I profile a shell script? |
1,350,653,172,000 |
Could some one direct me to a command to measure TLB misses on LINUX, please? Is it okay to consider (or approximate) minor page faults as TLB misses?
|
You can use perf to access the hardware performance counters:
$ perf stat -e dTLB-load-misses,iTLB-load-misses /path/to/command
e.g. :
$ perf stat -e dTLB-load-misses,iTLB-load-misses /bin/ls > /dev/null
Performance counter stats for '/bin/ls':
5,775 dTLB-load-misses ... | Command to measure TLB misses on LINUX? |
1,350,653,172,000 |
I'd like to use the perf utility to gather measurements for my program. It runs on a shared cluster machine with Debian 9 where by default the /proc/sys/kernel/perf_event_paranoid is set to 3, therefore disallowing me to gather measurements. Before changing it, I'd like to know what the implications of this are.
Is i... |
It’s only security, performance isn’t affected (at least, when perf isn’t running; and even then, perf’s impact is supposed to be minimal). Changing perf_event_paranoid doesn’t change the performance characteristics of the system, whether perf is running or not.
There’s a detailed discussion of the security implicatio... | Security implications of changing “perf_event_paranoid” |
1,350,653,172,000 |
Is it possible to check if given program was compiled with GNU gprof instrumentation, i.e. with '-pg' flag passed to both compiler and linker, without running it to check if it would generate a gmon.out file?
|
You could check for references to function mcount (or possibly _mcount or __mcount according to Implementation of Profiling). This function is necessary for profiling to work, and should be absent for non-profiled binaries.
Something like:
$ readelf -s someprog | egrep "\s(_+)?mcount\b" && echo "Profiling is on for so... | Detect if an ELF binary was built with gprof instrumentation? |
1,350,653,172,000 |
tldr: Does mtrace still work or am I just doing it wrong?
I was attempting to use mtrace and have been unable to get it to write data to a file. I followed the instructions in man 3 mtrace:
t_mtrace.c:
#include <mcheck.h>
#include <stdlib.h>
#include <stdio.h>
int
main(int argc, char *argv[])
{
mtrace();
for... |
mtrace still works, but the man page is outdated. The reference documentation explains how to use it:
LD_PRELOAD=/usr/lib64/libc_malloc_debug.so.0 MALLOC_TRACE=/tmp/t ./t_mtrace
(replace with the appropriate path to libc_malloc_debug.so on your system — the above is appropriate for Fedora and derivatives on 64-bit x8... | Does mtrace() still work in modern distros? |
1,350,653,172,000 |
I am looking for a way to profile a single process including time spent for CPU, I/O, memory usage over time and optionally system calls.
I already know callgrind offering some basic profiling features but only with debugging information and lacking most of the other mentioned information.
I know strace -c providing a... |
Meanwhile I wrote my own program - audria - capable of monitoring the resource usage of one or more processes, including current/average CPU usage, virtual memory usage, IO load and other information.
| Detailed Per-Process Profiling |
1,350,653,172,000 |
I'm trying to get the nearest to real-time processing I can with a Raspbian distribution on a Raspberry Pi for manipulating its GPIO pins. I want to get a "feel" for the kind of performance I can expect.
I was going to do this by writing a simple C program that toggles a pin repeatedly as fast as possible, and monitor... |
I don't have an answer but you might find one amongst the tools, examples and resources written or listed by
Brendan Gregg on the perf command and Linux kernel ftrace and debugfs.
On my Raspberry Pi these tools were in package perf-tools-unstable. The perf command was actually in /usr/bin/perf_3.16.
Of interest may ... | Record time of every process or thread context switch |
1,350,653,172,000 |
I am playing around with htop, gprof, etc. I'd like a program that basically just runs on multiple cores so I can profile it and learn how to use these tools. I know I can write my own c++ code with -fopenmp and run a useless loop, but I was hoping there's a stock unix command I can use?
Basically I just want a progra... |
Not stock, but here are a few tool I have used before:
primes (usually in your distributions games package) just simply fork off a few dozen and it will generate primes from now until forever.
Stress: http://people.seas.harvard.edu/~apw/stress/
CPUBurn: http://patrickmylund.com/projects/cpuburn/
| Is there a mock program that uses the CPU on multiple cores? |
1,350,653,172,000 |
The following command gives me the full trace of steps
zsh -i -c -x exit > trace 2>&1
I'd love for it to also capture, next to each exact step (e.g. as a first column), how long that step took.
Does Zsh provide an easy way to do that?
|
You can easily get something close (with reasonably recent versions): a timestamp on each step. From the documentation of -x:
The output is preceded by the value of $PS4, formatted as described in Prompt Expansion.
You can put a timestamp in the trace prefix. %. gives you nanosecond precision with zsh ≥5.6, only mic... | Tracing and timing every step of the initialization of the shell |
1,350,653,172,000 |
I have a java program which implements the Hungarian algorithm. I made changes to the existing code in such a way that the input is read from file. I have a pretty huge input around 32,000 rows for which I am calculating the maximum edge weight.
The problem is, when I run the program using the command,
java Hungarian... |
Based on the question and comments, you could look up the java running call stack via the jstack command:
jstack processid
If there are some threads waiting for a long time on some condition then it is most likely a deadlock. A deadlock might be rare on production grade code but common on experimental multithreaded c... | program executing for 2 days |
1,350,653,172,000 |
In my program, real time duration is sometimes as much as 3 times that of cpu time. This is a single thread application that does a lot of memory allocation and NFS base read/write. So my doubt is that it is either mem-swap or NFS read-write that is slowing things down.
For example, the following is the output of /usr... |
Not sure exactly.. but looks like you might need strace ...
Example:
Here, say if I have a process with process id 1055 then doing something like this :
neo $ sudo strace -w -c -p1055
strace: Process 1055 attached
^Cstrace: Process 1055 detached
% time seconds usecs/call calls errors syscall
------ -----... | How to profile wall-clock time? |
1,350,653,172,000 |
I run Debian 10 and since two weeks or so the PDF reader Atril (a fork of Evince) takes 25 seconds to start. Previously it started almost instantly. Now I'm trying to find out what causes the delay. I have downloaded the source package and built and installed it with profiling enabled:
cd "$HOME/.local/src"
apt source... |
I personally wouldn't dig that deep. I'd recommend not building your own atril, but using the debian atril (because that's what you'll use afterwards, and also, debian gives you debugsymbols).
By order of complexity:
run top (better even: htop, and in its settings disactivate "Hide userland process threads") while st... | How do I profile a real world application? |
1,350,653,172,000 |
I would like to generate a log of all virtual memory accesses performed in user mode and kernel mode as a result of running some program.
Besides collecting memory access locations, I also want to capture other state information (e.g., instruction pointer, thread identifier). I anticipate that I won't be able to colle... |
I wanted to update my question with the information I found in case someone else ever has a similar question.
My understanding of Linux tracing tools is that most use probes (which I'm using to describe instrumentation that is dynamically inserted into an executable's binary) and tracepoints (which I'm using to descri... | How can I profile virtual memory accesses made in user mode and kernel mode? |
1,350,653,172,000 |
It's possible to create a bitmap or a vector image out of the data collected by the perf profiler under linux ?
|
Take a look at this article titled: perf Examples, it has a number of examples that show how you can make flame graphs such as this one:
The above graph can be generated as an interactive SVG file as well. The graph was generated using the FlameGraph tool. This is separate software from perf.
A series of commands... | Does perf includes some "graphing" abilities? |
1,350,653,172,000 |
Are there any system tools that allow you to profile an application's usage of storage? Basically, I'm looking for information on determining whether there are more large sequential reads, tiny sequential read, random writes with backtracks, etc.
|
Eventually found the answer. Kind of obvious and I'm a little ashamed I didn't think of it before. But here it goes: Bascially blktrace/blkparse are the commands we're looking for. This is the general idea I'm basing it off of, but I can pipe the output of blktrace to blkparse then save blkparse's output to a file. On... | Establishing I/O Patterns for an Application |
1,446,123,631,000 |
I keep getting the following error messages in the syslog of one of my servers:
# tail /var/log/syslog
Oct 29 13:48:40 myserver dbus[19617]: [system] Failed to activate service 'org.freedesktop.login1': timed out
Oct 29 13:48:40 myserver dbus[19617]: [system] Activating via systemd: service name='org.freedesktop.login... |
Restart logind:
# systemctl restart systemd-logind
Beware that restarting dbus will break their connection again.
| dbus: [system] Failed to activate service 'org.freedesktop.login1': timed out |
1,446,123,631,000 |
Is there any (simple) way to deny FTP connections based on the general physical location? I plan to use FTP as a simple cloud storage for me and my friends. I use an odroid c2 (similar to raspberry pi but uses arm64 architecture) running Debian 8 with proftpd and ufw as my firewall. Ftp server runs on a non-standard p... |
Use pam and geoip module
This PAM module provides GeoIP checking for logins. The user can be
allowed or denied based on the location of the originating IP address.
This is similar to pam_access(8), but uses a GeoIP City or GeoIP
Country database instead of host name / IP matching.
| Limit FTP connections by area |
1,446,123,631,000 |
I'm trying to get a ProFTPD to LDAP auth on a Active Directory base. I still couldn't figure out what could be wrong with my configuration since, executing a LDAP query with ldapsearch seems fine
proftpd.conf
/etc/proftpd.conf
# This is the ProFTPD configuration file
ServerName "FTP and Ldap"
Ser... |
To achieve this, the URL must be RFC 2255 compliant and, using Proftpd queries will only work when they are filtered by an OU. These queries will not work at LDAP root level.
LDAPServer ldap://domaincontroller.domain.net:389/??sub
Organizational Unity:
LDAPDoAuth on "OU=OFFICE,dc=domain,dc=net" (&(sAMAccountName=%v)(... | Configuring proftpd and mod_ldap.c query not working - any ideas? |
1,446,123,631,000 |
Can I use ProFTPd without using a chroot jail (thereby preventing access to anything outside of the FTP root)? I have a requirement to have symlinks in my FTP source that point to locations outside of the directory where I root my FTP service.
All of the docs and discussion I've read on ProFTPd talk about how to use t... |
ProFTPD has the mod_vroot module for this purpose. You can compile this module into ProFTPD yourself or install it if your repositories have it (apt-get install proftpd-mod-vroot for certain Debian repositories).
mod_vroot allows a user to configure a "virtual chroot", setting the DefaultRoot directive (the initial/ro... | Implement ProFTPd server without chroot |
1,446,123,631,000 |
On one of my servers, I have ProFTPD installed in Debian 7. I need special permission only for 2 specific folders. These are:
append - user must be able to append data to an existing file
rename - user must not be able to rename file if same exists
How can I do this?
|
As far as I understand there are no special operations like append and rename that you can configure.
An append effectively is opening a file and then writing it with a different content (even if you only add to the file). You will need to have write privileges on that file.
A rename effectively is moving a file from ... | How to set special folder permission on proFTPD? |
1,446,123,631,000 |
I'm using proftpd on my server (ubuntu 16.04 x86_64).
I see that proftpd run under proftpd user:
$ ps aux | grep [p]roftpd
proftpd 26334 0.0 0.1 112656 716 ? Ss 04:39 0:00 proftpd: (accepting connections)
proftpd write logs to /var/log/proftpd. But write to this directory can only root:
$ ls -la /var/... |
ProFTPd, like many other services on Unix, uses syslog to do logging. syslog is a process running with superuser privileges. This means that ProFTPd itself never has to create files in the log directory.
Yes. It is as it should be. DON'T CHANGE THIS
In general, any logged user activities should only be accessible by... | How process (user1) can write log to directory (root) |
1,446,123,631,000 |
I need a FTP server on my machine, a Fedora 23. I want a simple setup, and I decided for ProFTPd and authentication with mod_auth_unix.c (this is just about my machine).
I installed ProFTPd and configured it. I had some problem in logging in from the local machine, and eventually I realized the problem was related to ... |
Answering my own question:
I was able to solve the problem by restoring the configuration of my /etc/proftpd.conf to
AuthOrder mod_auth_pam.c* mod_auth_unix.c
SELinux was configured by setting the following flags:
setsebool ftpd_full_access 1
setsebool ftp_home_dir 1
Apparently the problem was related with mod_auth_... | SELinux, ProFTPd and the silent log |
1,446,123,631,000 |
I'm stumped. I've seen the related questions about editing /etc/sysconfig/iptables-config, but I'm running CentOS 7 (and webmin/virtualmin), which uses firewalld instead of iptables.
How do I get modprobe nf_conntrack_ftp to persist after a reboot? I tried setting up a cron on reboot to issue the command, but that did... |
In /etc/modules-load.d, add a file {filename}.conf. That file should have the following contents:
nf_conntrack_ftp
Do the following for more info:
man modules-load.d
Here's the doc for RHEL7:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sec-Persistent_Modu... | How to make modprobe nf_conntrack_ftp persist a reboot on CentOS 7 and firewalld? |
1,446,123,631,000 |
I've been trying to configure my FTPS server which is behind NAT.
so I've opened ports 20, 21 as well as 2120-2180 in my NAT (TCP+UDP) and configured proftpd to use this ports for passive communications.
However, trying to connect using FileZilla leads to the following log: (in french, but quite clear actually)
Statut... |
FTP is a horrible protocol. It uses two ports -- one for commands, one for data. This makes it notoriously difficult to NAT, since a router would need to parse the command channel and figure out that a second connection is expected for this FTP conversation. Doing so is ugly, but also the only way to make NAT work wit... | Proftpd doesn't answer to "PASV" command |
1,446,123,631,000 |
A simple question,with this configuration I allow anon ftp users.
ServerName "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
Port 2121
Umask 022
MaxInstances 30
User ftp
Group ftp
SystemLog ... |
Quote from ProFTPD: Configuring Limits
What if a site wished to allow only anonymous access? This would be configured using the LOGIN command group, as above:
<Limit LOGIN>
DenyAll
</Limit>
<Anonymous ~ftp>
<Limit LOGIN>
AllowAll
</Limit>
...
</Anonymous>
The <Limit> section outside of the <Anonymous>... | Proftpd: total disable user login |
1,446,123,631,000 |
I'm have setup a ProFTPd user on my Debian based Nas system for Backups with his default folder. Now I want to ensure that this user only have access to his to his folder. I have read something about it and I have found something that I have to put defaultroot ~ in /etc/proftpd/proftpd.conf. But if I do this all my FT... |
There is a second paramter to DefaultRoot ~, a group-expression which may be:
DefaultRoot ~ !group_not_chrooted
this means that members of this group won't be chrooted.
or
DefaultRoot ~ group1
this means that only members of these groups will be chrooted.
So you can add group for user you don't want to be restricted... | Keep ProFTPD user in his home Folder |
1,446,123,631,000 |
I'm using proftpd on my server (ubuntu 16.04 x86_64).
Default proftpd use standart 21 port. I can connect from my home notebook to ftp with active mode without problem.
Now I stop proftpd, change port from 21 to 10021, start service again. And now I can not connect with active mode, only with passive mode.
What's ch... |
Your firewall (router) has a connection tracking helper for FTP. When it sees an FTP control connection (which it recognizes by TCP destination port == 21), it watches the commands. When it sees your client send the PORT command, it rewrites it (to your external IP address, and maybe a different port) and keeps track ... | While stop working active mode FTP after change server port |
1,446,123,631,000 |
I want to change my ProFTPD server port from 21 to 1945. But I didn't find any port mention in the proftpd.conf file. When I add port 21 in the conf file and restart the ftp server it shows the following error:
Starting proftpd (via systemctl): Job failed. See system logs and 'systemctl status' for details.
[FAILED]... |
You can use Port directive:
Port <port number>
A note that if you set port to N, then you must let port N-1 available too. RFC959 defined that source port for active data transfer must be N-1.
You can use Port directive both in server context or virtual server context. Setting Port 0 disable server.
| How to change the ftp server port in ProFTPD |
1,446,123,631,000 |
I am having difficulty installing proftp or pureftp on centos 6. I have followed the typical instructions (alternatively) which go like this
# Add EPL repository
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Install
yum install proftpd
# Alternatively
yum install pure-ftpd
T... |
Looks like probably epel on your machine is not enabled.
Even though you installed it, you may have to enable it manually.
Check /etc/yum.repos.d/ for epel.repo file and set it to enabled=1 if it's not already.
As per your finding, check also /etc/yum.repos.d/archive, as the file may be put there by the package insta... | Unable to install proftp or pureftp on centos 6 (typical instructions don't work) |
1,446,123,631,000 |
uploaded file via filezilla to proftp server(on ubuntu 14.04 lts) but reported 550 error
550 download.html: Permission denied
Error: Critical file transfer error
I try to set the directory to chmod 777
but error is same
ftp for download is OK
your comment welcome
|
Exactly the same thing happened to me after upgrading from Precise Pangolin to Trusty Tahr. I investigated and it looks like /etc/vsftpd.conf, the FTP configuration file, was one of the configuration files amended during the upgrade. Specifically, this line:
write_enable=YES
which I had previously uncommented was now... | uploaded file via filezilla to proftp server(on ubuntu 14.04 lts) but reported 550 error |
1,446,123,631,000 |
I have installed prftpd and proftpd-mysql rpm on a linux machine. Intention is to have usermanagement of ftpusers via web.
So I have installed proftpadmin from Here
Now when I am adding the below lines in /etc/proftpd.conf file
SQLConnectInfo proftpd@localhost root root
SQLAuthenticate ... |
Here's several problem I can already identify:
#AuthOrder does not mention mod_sql.c so it will never use mysql to identify your users.
AuthOrder mod_sql.c mod_auth_pam.c mod_auth_unix.c
#this code shouldn't be commented in your config file and should look like this or you will never enable sql_mod
<IfModule mod_... | proftpd via mysql & web management of FTP users |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.