From shlomif at gmail.com Sun Apr 1 12:31:27 2018 From: shlomif at gmail.com (Shlomi Fish) Date: Sun, 1 Apr 2018 12:31:27 +0300 Subject: Fwd: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: <20180401122549.429d01ac@telaviv1.shlomifish.org> References: <20180401122549.429d01ac@telaviv1.shlomifish.org> Message-ID: ---------- Forwarded message ---------- From: Shlomi Fish shlomif at shlomifish.org [fc-solve-discuss] < fc-solve-discuss at yahoogroups.com> Date: Sun, Apr 1, 2018 at 12:25 PM Subject: [ANN] Freecell Solver will be rewritten in Rust-lang To: Freecell Solving Discussions Hi all! We are happy to announce that we have decided to reimplement Freecell Solver ( http://fc-solve.shlomifish.org/ ) in the Rust programming language ( https://en.wikipedia.org/wiki/Rust_(programming_language) ).. Rust will provide the following advantages compared to the venerable C language, in which Freecell Solver is currently written: 1. Improved performance. 2. Far superior compilation speed. 3. Better portability. However, it also has some disadvantages, which we hope will not hinder the conversion: 1. The Rust compiler is much more lax than GCC's C compiler. 2. Rust has much more undefined behaviours ( https://en.wikipedia.org/wiki/Undefined_behavior ) than C, and is generally less safe. 3. The Rust licence is more restrictive than GCC's. Nevertheless, we plan to proceed with this. We also have a future goal of porting PySol FC ( http://pysolfc.sourceforge.net/ ) from Python to Rust due to the superior dynamic nature of Rust and its succinctness (see: http://www.paulgraham.com/power.html ). Regards, ? Shlomi Fish, CTO, Freecell Solver Enterprises? -- ---------------------------------------------------------- Shlomi Fish http://www.shlomifish.org/ Parody of "The Fountainhead" - http://shlom.in/towtf The reason the Messiah has not come yet, is because Chuck Norris keeps finding faults in God?s plan for his coming. ? http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . __._,_.___ ------------------------------ Posted by: Shlomi Fish ------------------------------ Reply via web post ? Reply to sender ? Reply to group ? Start a New Topic ? Messages in this topic (1) ------------------------------ Have you tried the highest rated email app? With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage. ------------------------------ Visit Your Group [image: Yahoo! Groups] ? Privacy ? Unsubscribe ? Terms of Use . __,_._,___ -- Shlomi Fish http://www.shlomifish.org/ You can never truly appreciate The Gilmore Girls until you've watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -------------- next part -------------- An HTML attachment was scrubbed... URL: From slitt at troubleshooters.com Sun Apr 1 19:56:03 2018 From: slitt at troubleshooters.com (Steve Litt) Date: Sun, 1 Apr 2018 12:56:03 -0400 Subject: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: References: <20180401122549.429d01ac@telaviv1.shlomifish.org> Message-ID: <20180401125603.0c29cc4c@mydesk.domain.cxm> On Sun, 1 Apr 2018 12:31:27 +0300 Shlomi Fish wrote: > ---------- Forwarded message ---------- > From: Shlomi Fish shlomif at shlomifish.org [fc-solve-discuss] < > fc-solve-discuss at yahoogroups.com> > Date: Sun, Apr 1, 2018 at 12:25 PM > Subject: [ANN] Freecell Solver will be rewritten in Rust-lang > To: Freecell Solving Discussions > > > > > Hi all! > > We are happy to announce that we have decided to reimplement Freecell > Solver ( http://fc-solve.shlomifish.org/ ) in the Rust programming > language > ( https://en.wikipedia.org/wiki/Rust_(programming_language) ).. Rust > will provide the following advantages compared to the venerable C > language, in which Freecell Solver is currently written: > > 1. Improved performance. > > 2. Far superior compilation speed. > > 3. Better portability. > > However, it also has some disadvantages, which we hope will not hinder > the conversion: > > 1. The Rust compiler is much more lax than GCC's C compiler. > > 2. Rust has much more undefined behaviours > ( https://en.wikipedia.org/wiki/Undefined_behavior ) than C, and is > generally > less safe. > > 3. The Rust licence is more restrictive than GCC's. > > Nevertheless, we plan to proceed with this. We also have a future goal > of porting PySol FC ( http://pysolfc.sourceforge.net/ ) from Python > to Rust due to the superior dynamic nature of Rust and its > succinctness (see: http://www.paulgraham.com/power.html ). > > Regards, > > ? Shlomi Fish, CTO, Freecell Solver Enterprises? Hi Shlomi, There's a boatload of new computer languages on the scene today. Which languages did you consider before picking Rust? SteveT Steve Litt April 2018 featured book: Troubleshooting Techniques of the Successful Technologist http://www.troubleshooters.com/techniques From shlomif at gmail.com Sun Apr 1 20:11:05 2018 From: shlomif at gmail.com (Shlomi Fish) Date: Sun, 1 Apr 2018 20:11:05 +0300 Subject: How can I put the Firefox location/URL bar on its own horizontal toolbar strip? In-Reply-To: References: Message-ID: On Thu, Mar 15, 2018 at 8:43 PM, ??? ?? ???????? < gootvilig.davidhai at gmail.com> wrote: > Not that I am an expert on the subject but after a quick > google-foo/ddg-foo I got the impression this is still impossible in FF > quantum. > But U still have the ability to make more space for the url-bar, via > removing staff or moving staff to the overflow section, and finally there > is the compact mode. > > It was possible in the past but this feature was apparently removed. > Good luck. > dhg > > On Wed, Mar 14, 2018 at 10:10 AM, Shlomi Fish wrote: > >> Hi all! >> >> How can I put the Firefox location/URL bar on its own horizontal toolbar >> strip? Currently it is quite narrow and I want it to have more space. I >> don't see how to add a new empty toolbar to firefox using the UI. >> >> Can anyone help? >> >> -- >> Shlomi Fish http://www.shlomifish.org/ >> >> You can never truly appreciate The Gilmore Girls until you've watched it >> in the original Klingon. >> >> Please reply to list if it's a mailing list post - http://shlom.in/reply >> . >> >> _______________________________________________ >> Linux-il mailing list >> Linux-il at cs.huji.ac.il >> http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il >> >> > -- Shlomi Fish http://www.shlomifish.org/ You can never truly appreciate The Gilmore Girls until you've watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomif at gmail.com Sun Apr 1 20:14:58 2018 From: shlomif at gmail.com (Shlomi Fish) Date: Sun, 1 Apr 2018 20:14:58 +0300 Subject: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: <20180401125603.0c29cc4c@mydesk.domain.cxm> References: <20180401122549.429d01ac@telaviv1.shlomifish.org> <20180401125603.0c29cc4c@mydesk.domain.cxm> Message-ID: Hi Steve! On Sun, Apr 1, 2018 at 7:56 PM, Steve Litt wrote: > On Sun, 1 Apr 2018 12:31:27 +0300 > Shlomi Fish wrote: > > > ---------- Forwarded message ---------- > > From: Shlomi Fish shlomif at shlomifish.org [fc-solve-discuss] < > > fc-solve-discuss at yahoogroups.com> > > Date: Sun, Apr 1, 2018 at 12:25 PM > > Subject: [ANN] Freecell Solver will be rewritten in Rust-lang > > To: Freecell Solving Discussions > > > > > > > > > > Hi all! > > > > We are happy to announce that we have decided to reimplement Freecell > > Solver ( http://fc-solve.shlomifish.org/ ) in the Rust programming > > language > > ( https://en.wikipedia.org/wiki/Rust_(programming_language) ).. Rust > > will provide the following advantages compared to the venerable C > > language, in which Freecell Solver is currently written: > > > > 1. Improved performance. > > > > 2. Far superior compilation speed. > > > > 3. Better portability. > > > > However, it also has some disadvantages, which we hope will not hinder > > the conversion: > > > > 1. The Rust compiler is much more lax than GCC's C compiler. > > > > 2. Rust has much more undefined behaviours > > ( https://en.wikipedia.org/wiki/Undefined_behavior ) than C, and is > > generally > > less safe. > > > > 3. The Rust licence is more restrictive than GCC's. > > > > Nevertheless, we plan to proceed with this. We also have a future goal > > of porting PySol FC ( http://pysolfc.sourceforge.net/ ) from Python > > to Rust due to the superior dynamic nature of Rust and its > > succinctness (see: http://www.paulgraham.com/power.html ). > > > > Regards, > > > > ? Shlomi Fish, CTO, Freecell Solver Enterprises? > > Hi Shlomi, > > There's a boatload of new computer languages on the scene today. Which > languages did you consider before picking Rust? > > I only considered Rust because it does not have any conceivable competition for my needs. Regards, -- Shlomi P.S: note the date. > SteveT > > Steve Litt > April 2018 featured book: Troubleshooting Techniques > of the Successful Technologist > http://www.troubleshooters.com/techniques > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -- Shlomi Fish http://www.shlomifish.org/ You can never truly appreciate The Gilmore Girls until you've watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -------------- next part -------------- An HTML attachment was scrubbed... URL: From slitt at troubleshooters.com Mon Apr 2 02:07:43 2018 From: slitt at troubleshooters.com (Steve Litt) Date: Sun, 1 Apr 2018 19:07:43 -0400 Subject: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: References: <20180401122549.429d01ac@telaviv1.shlomifish.org> <20180401125603.0c29cc4c@mydesk.domain.cxm> Message-ID: <20180401190743.2d66ad51@mydesk.domain.cxm> On Sun, 1 Apr 2018 20:14:58 +0300 Shlomi Fish wrote: > > Hi Shlomi, > > > > There's a boatload of new computer languages on the scene today. > > Which languages did you consider before picking Rust? > > > > > I only considered Rust because it does not have any conceivable > competition for my needs. > > Regards, > > -- Shlomi > > P.S: note the date. LOL, OK Shlomi, you got me. I was especially susceptible to this particular 4/1'ism because making a smartened backtracking algorithm in an arcane language is something *I* would do :-). Steve From shachar at shemesh.biz Mon Apr 2 07:50:51 2018 From: shachar at shemesh.biz (Shachar Shemesh) Date: Mon, 02 Apr 2018 07:50:51 +0300 Subject: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: <20180401190743.2d66ad51@mydesk.domain.cxm> References: <20180401122549.429d01ac@telaviv1.shlomifish.org> <20180401125603.0c29cc4c@mydesk.domain.cxm> <20180401190743.2d66ad51@mydesk.domain.cxm> Message-ID: <37bdd0e67c5abb4bd28389009e4a9c0d@shemesh.biz> As far as I can tell, programmers who want to program large projects that are latency sensitive have only choices for programming language: C++ (the default) D (if you're really careful) Rust (No, I do not consider C a suitable language for large scale projects, latency sensitive or otherwise). (I would have put ObjectiveC on this list had anyone been willing to program it for anything other than iOS apps). To me, taking a project and translating it to a language I want to learn makes perfect sense, as that's the only way to really learn a new language. As such, even in retrospect, I find nothing outrageous about Shlomi's announcement. On 02/04/2018 02:07, Steve Litt wrote: > On Sun, 1 Apr 2018 20:14:58 +0300 > Shlomi Fish wrote: > Hi Shlomi, There's a boatload of new computer languages on the scene today. Which languages did you consider before picking Rust? I only considered Rust because it does not have any conceivable competition for my needs. Regards, -- Shlomi P.S: note the date. LOL, OK Shlomi, you got me. I was especially susceptible to this particular 4/1'ism because making a smartened backtracking algorithm in an arcane language is something *I* would do :-). I don't think calling Rust "arcane" does it justice. Firefox is hardly a niche program, and the FF developers credit much of the performance leap it has done recently to the rewrite to Rust. Of the list above, Rust is the only one I do not know. My introduction to Rust was through working with D over the past four years. That has been a mixed bag, with some really great stuff and other stuff that was downright horrible. In complaining about it, I actually started fantasizing about starting my own programming language, to be called Practical ("I program a Practical programming language". http://practical.pl was already taken, unfortunately). But then I found out that whenever I said "In Practical, so and so", the answer would be "That's the way it is in Rust". Now, I don't have any project that is a good fit for porting to Rust. Rsyncrypto has been out of active maintenance for too long, and fakeroot-ng does too many dodgy things to make Rust practical (pun intended). With that in mind, I think calling it "arcane" is simply incorrect. Rust is attempting to make compile-time guarantees about memory safety. That is an interesting concept, but I cannot make informed jugment about how it works in practice without actually writing something substantial in the language. There are too many things you do not see until you actually break your teeth on a language. Granted, freecell solver is _not_ a latency sensitive program, and the advantages of porting it to Rust over, say, Go or Java, are less distinct. Then again, rsyncrypto is not a latency sensitive program either (fakeroot-ng is, BTW), and I'd do it just to gain another tool in my tool belt. So even with the hindsight, I still don't find Shlomi's announcement far fetched. Shachar -------------- next part -------------- An HTML attachment was scrubbed... URL: From shlomif at gmail.com Wed Apr 4 13:25:13 2018 From: shlomif at gmail.com (Shlomi Fish) Date: Wed, 4 Apr 2018 13:25:13 +0300 Subject: [ANN] Freecell Solver will be rewritten in Rust-lang In-Reply-To: <37bdd0e67c5abb4bd28389009e4a9c0d@shemesh.biz> References: <20180401122549.429d01ac@telaviv1.shlomifish.org> <20180401125603.0c29cc4c@mydesk.domain.cxm> <20180401190743.2d66ad51@mydesk.domain.cxm> <37bdd0e67c5abb4bd28389009e4a9c0d@shemesh.biz> Message-ID: Hi all! On Mon, Apr 2, 2018 at 7:50 AM, Shachar Shemesh wrote: > As far as I can tell, programmers who want to program large projects that > are latency sensitive have only choices for programming language: > > C++ (the default) > D (if you're really careful) > Rust > > (No, I do not consider C a suitable language for large scale projects, > latency sensitive or otherwise). > And I have quite a few doubts about C++ for that - http://shlomifishswiki.branchable.com/Links_against_C++/ . > (I would have put ObjectiveC on this list had anyone been willing to > program it for anything other than iOS apps). > > > Apple has created https://en.wikipedia.org/wiki/Swift_(programming_language) recently. > To me, taking a project and translating it to a language I want to learn > makes perfect sense, as that's the only way to really learn a new language. > As such, even in retrospect, I find nothing outrageous about Shlomi's > announcement. > have you read the lists of advantages and disadvantages? ;-) . > On 02/04/2018 02:07, Steve Litt wrote: > > On Sun, 1 Apr 2018 20:14:58 +0300 > Shlomi Fish wrote: > > Hi Shlomi, There's a boatload of new computer languages on the scene > today. Which languages did you consider before picking Rust? > > I only considered Rust because it does not have any conceivable > competition for my needs. Regards, -- Shlomi P.S: note the date. > > LOL, OK Shlomi, you got me. > > I was especially susceptible to this particular 4/1'ism because making > a smartened backtracking algorithm in an arcane language is something > *I* would do :-). > > I don't think calling Rust "arcane" does it justice. Firefox is hardly a > niche program, and the FF developers credit much of the performance leap it > has done recently to the rewrite to Rust. > > Of the list above, Rust is the only one I do not know. My introduction to > Rust was through working with D over the past four years. That has been a > mixed bag, with some really great stuff and other stuff that was downright > horrible. In complaining about it, I actually started fantasizing about > starting my own programming language, to be called Practical ("I program a > Practical programming language". http://practical.pl was already taken, > unfortunately). > > But then I found out that whenever I said "In Practical, so and so", the > answer would be "That's the way it is in Rust". > > Now, I don't have any project that is a good fit for porting to Rust. > Rsyncrypto has been out of active maintenance for too long, and fakeroot-ng > does too many dodgy things to make Rust practical (pun intended). With that > in mind, I think calling it "arcane" is simply incorrect. > > Rust is attempting to make compile-time guarantees about memory safety. > That is an interesting concept, but I cannot make informed jugment about > how it works in practice without actually writing something substantial in > the language. There are too many things you do not see until you actually > break your teeth on a language. > > Granted, freecell solver is *not* a latency sensitive program, and the > advantages of porting it to Rust over, say, Go or Java, are less distinct. > Then again, rsyncrypto is not a latency sensitive program either > (fakeroot-ng is, BTW), and I'd do it just to gain another tool in my tool > belt. > > So even with the hindsight, I still don't find Shlomi's announcement far > fetched. > > Shachar > > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > -- Shlomi Fish http://www.shlomifish.org/ You can never truly appreciate The Gilmore Girls until you've watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -------------- next part -------------- An HTML attachment was scrubbed... URL: From pub at goldshmidt.org Tue Apr 24 17:51:40 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Tue, 24 Apr 2018 17:51:40 +0300 Subject: ifdown/ifup and friends Message-ID: <8736zkpshv.fsf@goldshmidt.org> Hi all, I am trying to get my head around the problem of bringing network interfaces up and down and checking the state. I googled extensively, but I have not found an answer to the conundrum, and I am hoping that someone here may shed some light. My target platform is Debian wheezy (no, I can't upgrade it), but what I describe below is very similar on an up-to-date Fedora 27 (that, obviously, has a very different set of userspace tools and a very different kernel). What I am trying to achieve is as follows. Assume that the system in question gets a command (imagine an API of sorts) to reconfigure one of its multiple interfaces. Let's say that the control interface is eth0 and the request is to reconfigure eth3. Here, "reconfigure" may mean, e.g., "change the static IP address and maybe some routing rules" (or toggle between static and DHCP or whatever - staying static seems conceptually simpler). So the is an implementation (bash, run as root, etc.) that goes, in essence, * stop interface eth3 * change eth3 configuration * start interface eth3 which looks natural enough. It is also natural that there are stop() and start() functions that may include some subtleties such as flushing IP address, etc. The start() and stop() functions are used in other workflows and, in general, one would like to check whether the interface is up or down, at least to avoid superfluous error messages when one tries to bring up an interface that is already up, etc. (Such messages may pollute things for the API client, and hiding stderr in general is not a good idea because real errors may be lost.) The problem is that whatever I do in stop() (or by hand), e.g., * ifconfig eth3 down * ifdown --force eth3 (and --no-scripts, and whatever - on Debian) * ip link set eth3 down etc., etc., with infinite variations, the UP flag remains set (I also check with ifconfig, ip link show, etc.). Technically, the UP flag is the IFF_UP bit in the ifr_flags field of struct ifreq accessible through a ioctl (cf. man 7 netdevice). I went as far as writing a C program that uses the ioctl(s) (SIOCGIFFLAGS, SIOCSIFFLAGS) directly. To no avail: right after I toggle IFF_UP I check it again and it is *always* up... Again, this is on both Debian wheezy (old, kernel 3.2.0) and Fedora 27 (fully updated, kernel 4.15.17)... It also does not depend on whether the interface is designated as "auto" (on Debian) or anything else I could think of. I straced all kinds of commands and downloaded sources and did all kinds of things trying to understand what was going on, but so far in vain. By the way, I pulled the sources of ifupdown from Debian's git, and I didn't find any ioctl calls there. Could it be because they don't help (see above)? The only way (well, I could implement my own state...) I managed to work around the *original* is-the-interface-up? problem was by doing an equivalent of ifdown --force eth3 && sleep 1 && ifconfig eth3 0.0.0.0 for stop() and then testing for the presence of "inet" (rather than "UP") in the ifconfig's output (on Debian). By the way, the sleep is essential - without it it won't work, for whatever reason. The workaround above may or may not prove sufficient for the immediate purpose, but a) it's ugly, and b) I would like to understand how one can toggle the IFF_UP flag programmatically. I also have a dim recollection that ifdown/ifup and/or ifconfig down/up used to work in distant past... Any ideas? -- Oleg Goldshmidt | pub at goldshmidt.org From tzafrir at cohens.org.il Tue Apr 24 18:08:48 2018 From: tzafrir at cohens.org.il (Tzafrir Cohen) Date: Tue, 24 Apr 2018 17:08:48 +0200 Subject: ifdown/ifup and friends In-Reply-To: <8736zkpshv.fsf@goldshmidt.org> References: <8736zkpshv.fsf@goldshmidt.org> Message-ID: <20180424150846.zxkmody7mwachhdc@lemon> Hi, Not a good answer, just some thoughts: On Tue, Apr 24, 2018 at 05:51:40PM +0300, Oleg Goldshmidt wrote: > > Hi all, > > I am trying to get my head around the problem of bringing network > interfaces up and down and checking the state. I googled extensively, > but I have not found an answer to the conundrum, and I am hoping that > someone here may shed some light. > > My target platform is Debian wheezy (no, I can't upgrade it), but what I > describe below is very similar on an up-to-date Fedora 27 (that, > obviously, has a very different set of userspace tools and a very > different kernel). > > What I am trying to achieve is as follows. Assume that the system in > question gets a command (imagine an API of sorts) to reconfigure one of > its multiple interfaces. Let's say that the control interface is eth0 > and the request is to reconfigure eth3. Here, "reconfigure" may mean, > e.g., "change the static IP address and maybe some routing rules" (or > toggle between static and DHCP or whatever - staying static seems > conceptually simpler). > > So the is an implementation (bash, run as root, etc.) that goes, in > essence, > > * stop interface eth3 > * change eth3 configuration > * start interface eth3 > > which looks natural enough. It is also natural that there are stop() and > start() functions that may include some subtleties such as flushing IP > address, etc. The start() and stop() functions are used in other > workflows and, in general, one would like to check whether the interface > is up or down, at least to avoid superfluous error messages when one > tries to bring up an interface that is already up, etc. (Such messages > may pollute things for the API client, and hiding stderr in general is > not a good idea because real errors may be lost.) > > The problem is that whatever I do in stop() (or by hand), e.g., > > * ifconfig eth3 down > * ifdown --force eth3 (and --no-scripts, and whatever - on Debian) > * ip link set eth3 down Why don't you stop the interface with 'ifdown'? Also: why not use ip (and generally: iproute2 tools) everywhere? > > etc., etc., with infinite variations, the UP flag remains set (I also > check with ifconfig, ip link show, etc.). > > Technically, the UP flag is the IFF_UP bit in the ifr_flags field of > struct ifreq accessible through a ioctl (cf. man 7 netdevice). I went as > far as writing a C program that uses the ioctl(s) (SIOCGIFFLAGS, > SIOCSIFFLAGS) directly. To no avail: right after I toggle IFF_UP I check > it again and it is *always* up... Again, this is on both Debian wheezy > (old, kernel 3.2.0) and Fedora 27 (fully updated, kernel 4.15.17)... > > It also does not depend on whether the interface is designated as "auto" > (on Debian) or anything else I could think of. "auto" only means this interface is to be started at boot. So it indeed should be irrelevant. -- Tzafrir Cohen | tzafrir at jabber.org | VIM is http://tzafrir.org.il | | a Mutt's tzafrir at cohens.org.il | | best tzafrir at debian.org | | friend From pub at goldshmidt.org Tue Apr 24 18:53:01 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Tue, 24 Apr 2018 18:53:01 +0300 Subject: ifdown/ifup and friends In-Reply-To: <20180424150846.zxkmody7mwachhdc@lemon> References: <8736zkpshv.fsf@goldshmidt.org> <20180424150846.zxkmody7mwachhdc@lemon> Message-ID: <87wowwob36.fsf@goldshmidt.org> Tzafrir Cohen writes: >> The problem is that whatever I do in stop() (or by hand), e.g., >> >> * ifconfig eth3 down >> * ifdown --force eth3 (and --no-scripts, and whatever - on Debian) >> * ip link set eth3 down > > Why don't you stop the interface with 'ifdown'? Also: why not use ip > (and generally: iproute2 tools) everywhere? None of them work (in the sense described in the original post - no difference in the output of ifconfig before and after). I tried all of them, as hinted in the quoted part above. > "auto" only means this interface is to be started at boot. So it indeed > should be irrelevant. I know. I was clutching at straws. Interfaces marked "auto" are treated specially in some sense (e.g., ifup -a), so I tried to see if there was any difference. None. I also gre suspicious about scripts under /etc/network/if-*.d/ so I tried ifdown --no-scripts (in addition to --force), in vain. Let me also emphasize that the actual code in our scripts does not matter because things do not work when I run commands by hand, either. Thanks, -- Oleg Goldshmidt | pub at goldshmidt.org From lior at okman.name Wed Apr 25 09:06:59 2018 From: lior at okman.name (Lior Okman) Date: Wed, 25 Apr 2018 09:06:59 +0300 Subject: ifdown/ifup and friends In-Reply-To: <87wowwob36.fsf@goldshmidt.org> References: <8736zkpshv.fsf@goldshmidt.org> <20180424150846.zxkmody7mwachhdc@lemon> <87wowwob36.fsf@goldshmidt.org> Message-ID: Hi, On my current host I have the following: $ ip addr show enp4s0 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff Running the "set link down" command yields this: $ sudo ip link set down enp4s0 $ ip addr show enp4s0 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff This seems to do what you want it to. The other way works as well. $ sudo ip link set up enp4s0 $ ip addr show enp4s0 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff My system is a debian SID host, except that it is using the 4.16.3 kernel. -- Lior On Tue, Apr 24, 2018 at 6:53 PM, Oleg Goldshmidt wrote: > Tzafrir Cohen writes: > > >> The problem is that whatever I do in stop() (or by hand), e.g., > >> > >> * ifconfig eth3 down > >> * ifdown --force eth3 (and --no-scripts, and whatever - on Debian) > >> * ip link set eth3 down > > > > Why don't you stop the interface with 'ifdown'? Also: why not use ip > > (and generally: iproute2 tools) everywhere? > > None of them work (in the sense described in the original post - no > difference in the output of ifconfig before and after). I tried all of > them, as hinted in the quoted part above. > > > "auto" only means this interface is to be started at boot. So it indeed > > should be irrelevant. > > I know. I was clutching at straws. Interfaces marked "auto" are treated > specially in some sense (e.g., ifup -a), so I tried to see if there was > any difference. None. > > I also gre suspicious about scripts under /etc/network/if-*.d/ so I > tried ifdown --no-scripts (in addition to --force), in vain. > > Let me also emphasize that the actual code in our scripts does not > matter because things do not work when I run commands by hand, either. > > Thanks, > > -- > Oleg Goldshmidt | pub at goldshmidt.org > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pub at goldshmidt.org Wed Apr 25 17:05:51 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Wed, 25 Apr 2018 17:05:51 +0300 Subject: ifdown/ifup and friends In-Reply-To: References: <8736zkpshv.fsf@goldshmidt.org> <20180424150846.zxkmody7mwachhdc@lemon> <87wowwob36.fsf@goldshmidt.org> Message-ID: <87k1svjs8w.fsf@goldshmidt.org> Thanks, but unfortunately, it does not work for me, and I had tried that before posting. I have just verified again. I started with the interface (eth3) connected (NB: my machine is a VMware VM, which should not matter, but might), while yours seems disconnected ("NO-CARRIER", "state DOWN"). root at hostname:~# ip addr show eth3 5: eth3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:b7:20:8c brd ff:ff:ff:ff:ff:ff inet 192.168.50.149/24 brd 192.168.50.255 scope global eth3 root at hostname:~# ip link set down eth3 root at hostname:~# ip addr show eth3 5: eth3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:50:56:b7:20:8c brd ff:ff:ff:ff:ff:ff inet 192.168.50.149/24 brd 192.168.50.255 scope global eth3 Then I disconnected the interface in vSphere, only to get root at hostname:~# ip addr show eth3 5: eth3: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000 link/ether 00:50:56:b7:20:8c brd ff:ff:ff:ff:ff:ff root at hostname:~# ip link set down eth3 root at hostname:~# ip addr show eth3 5: eth3: mtu 1500 qdisc pfifo_fast state DOWN qlen 1000 link/ether 00:50:56:b7:20:8c brd ff:ff:ff:ff:ff:ff i.e., whether the interface is connected or not does not change a thing. Can it depend on the network driver used? I have e1000 loaded (and 8021q)... Lior Okman writes: > Hi, > > On my current host I have the following: > > $ ip addr show enp4s0 > 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 > link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff > > Running the "set link down" command yields this: > > $ sudo ip link set down enp4s0 > $ ip addr show enp4s0 > 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 > link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff > > This seems to do what you want it to. The other way works as well. > > $ sudo ip link set up enp4s0 > $ ip addr show enp4s0 > 2: enp4s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 > link/ether 70:85:c2:66:5a:96 brd ff:ff:ff:ff:ff:ff > > My system is a debian SID host, except that it is using the 4.16.3 kernel. > > -- > Lior -- Oleg Goldshmidt | pub at goldshmidt.org From pub at goldshmidt.org Wed Apr 25 17:47:33 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Wed, 25 Apr 2018 17:47:33 +0300 Subject: ifdown/ifup and friends In-Reply-To: <87k1svjs8w.fsf@goldshmidt.org> References: <8736zkpshv.fsf@goldshmidt.org> <20180424150846.zxkmody7mwachhdc@lemon> <87wowwob36.fsf@goldshmidt.org> <87k1svjs8w.fsf@goldshmidt.org> Message-ID: <87604fibqy.fsf@goldshmidt.org> Oleg Goldshmidt writes: > my machine is a VMware VM, which should not matter, but might Yes, it would seem that it does. A physical machine behaves differently than a virtual one, and it seems that "ip link set up|down" works on a physical machine. I will try and check if using a different driver for virtual NIC makes a difference. Lior, thanks again. -- Oleg Goldshmidt | pub at goldshmidt.org From david at davidsconsultants.com Wed Apr 25 22:12:35 2018 From: david at davidsconsultants.com (David Suna) Date: Wed, 25 Apr 2018 22:12:35 +0300 Subject: Server load spike debugging Message-ID: An HTML attachment was scrubbed... URL: From linux.il at gmail.com Wed Apr 25 22:32:11 2018 From: linux.il at gmail.com (linux.il) Date: Wed, 25 Apr 2018 22:32:11 +0300 Subject: Server load spike debugging In-Reply-To: References: Message-ID: - 1st, I suggest to activate some monitor which save historic data. You can install 'atop' or config some SaaS monitor. - How many RAM do you have? Is it dedicated MySQL server or you run webserver+MySQL? - I suggest to activate slow query log as well. Regards, vitaly On Wed, Apr 25, 2018 at 10:12 PM, David Suna wrote: > I am working on a VPS. Earlier today there was a load spike that made the > server unresponsive for a period of time (around 10-15 minutes). Both ssh > and web access were not responsive. After a while the problem just stopped > and the server started responding again. > > How can I go about diagnosing what caused the problem? I looked at our > application log around that time and I do not see anything out of the > ordinary. When I was finally able to get back into the server and I ran > top, the process that was using the most CPU was mysqld. I don't know if > that was the process that was causing the load spike at the time. > > I saw several references to MySQLTuner so I downloaded and ran it. It gave > some suggestions but I am not a DBA so I don't understand most of the > suggestions and I don't want to make any changes without understanding what > is involved. Below are the suggestions MySQLTuner came up with. If anyone > can explain some of the suggestions or point me in the direction of a good > resource that would explain them I would appreciate it. > > General recommendations: > Configure your accounts with ip or subnets only, then update your > configuration with skip-name-resolve=1 > Adjust your join queries to always utilize indexes > When making adjustments, make tmp_table_size/max_heap_table_size equal > Reduce your SELECT DISTINCT queries which have no LIMIT clause > Read this before changing innodb_log_file_size and/or > innodb_log_files_in_group: http://bit.ly/2wgkDvS > Variables to adjust: > query_cache_size (=0) > query_cache_type (=0) > query_cache_limit (> 1M, or use smaller result sets) > join_buffer_size (> 256.0K, or always use indexes with joins) > tmp_table_size (> 16M) > max_heap_table_size (> 16M) > innodb_buffer_pool_size (>= 908M) if possible. > innodb_log_file_size should be (=16M) if possible, so InnoDB total log > files size equals to 25% of buffer pool size. > > Thanks, > > -- > David Sunadavid at davidsconsultants.com > > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pub at goldshmidt.org Fri Apr 27 10:31:46 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Fri, 27 Apr 2018 10:31:46 +0300 Subject: ifdown/ifup and friends In-Reply-To: <87604fibqy.fsf@goldshmidt.org> References: <8736zkpshv.fsf@goldshmidt.org> <20180424150846.zxkmody7mwachhdc@lemon> <87wowwob36.fsf@goldshmidt.org> <87k1svjs8w.fsf@goldshmidt.org> <87604fibqy.fsf@goldshmidt.org> Message-ID: <87h8nxds0t.fsf@goldshmidt.org> Oleg Goldshmidt writes: > I will try and check if using a different driver for virtual NIC makes a > difference. Turns out not to be so simple, as the VMs come from OVFs and no NIC options (save for e1000 defined in the OVF) are available. I have a workaround, and I will try to create/install a from-scratch VM in my copious free time. Meanwhile, if anyone has a VMware VM lying around and can try ifconfig/ifdown/ifup/ip link etc. with different virtual NICs it will be highly appreciated. -- Oleg Goldshmidt | pub at goldshmidt.org From d.s at daniel.shahaf.name Sat Apr 28 01:05:59 2018 From: d.s at daniel.shahaf.name (Daniel Shahaf) Date: Fri, 27 Apr 2018 22:05:59 +0000 Subject: Server load spike debugging In-Reply-To: References: Message-ID: <1524866759.1521300.1353412608.5AB88951@webmail.messagingengine.com> David Suna wrote on Wed, 25 Apr 2018 22:12 +0300: > I am working on a VPS. Earlier today there was a load spike that made > the server unresponsive for a period of time (around 10-15 minutes). > Both ssh and web access were not responsive. After a while the problem > just stopped and the server started responding again. > > How can I go about diagnosing what caused the problem? It might help to keep an ssh session open throughout the day with a root shell (real '#' prompt, not just sudoable unprivileged shell) running in it; such a shell might be usable even when the CPU contention is so high that new ssh logins aren't possible. From rabin at rabin.io Sat Apr 28 22:55:14 2018 From: rabin at rabin.io (Rabin Yasharzadehe) Date: Sat, 28 Apr 2018 22:55:14 +0300 Subject: Server load spike debugging In-Reply-To: References: Message-ID: You can set a monitoring (or even just a script) to trigger (e.g when cpu usage > 50%) a profile recording for few secs and then you can inspect them with a tool like FlameScope which will allow you do dig deeper into the stack and understand where is the problem is coming from. -- Rabin -- Rabin On 25 April 2018 at 22:12, David Suna wrote: > I am working on a VPS. Earlier today there was a load spike that made the > server unresponsive for a period of time (around 10-15 minutes). Both ssh > and web access were not responsive. After a while the problem just stopped > and the server started responding again. > > How can I go about diagnosing what caused the problem? I looked at our > application log around that time and I do not see anything out of the > ordinary. When I was finally able to get back into the server and I ran > top, the process that was using the most CPU was mysqld. I don't know if > that was the process that was causing the load spike at the time. > > I saw several references to MySQLTuner so I downloaded and ran it. It gave > some suggestions but I am not a DBA so I don't understand most of the > suggestions and I don't want to make any changes without understanding what > is involved. Below are the suggestions MySQLTuner came up with. If anyone > can explain some of the suggestions or point me in the direction of a good > resource that would explain them I would appreciate it. > > General recommendations: > Configure your accounts with ip or subnets only, then update your > configuration with skip-name-resolve=1 > Adjust your join queries to always utilize indexes > When making adjustments, make tmp_table_size/max_heap_table_size equal > Reduce your SELECT DISTINCT queries which have no LIMIT clause > Read this before changing innodb_log_file_size and/or > innodb_log_files_in_group: http://bit.ly/2wgkDvS > Variables to adjust: > query_cache_size (=0) > query_cache_type (=0) > query_cache_limit (> 1M, or use smaller result sets) > join_buffer_size (> 256.0K, or always use indexes with joins) > tmp_table_size (> 16M) > max_heap_table_size (> 16M) > innodb_buffer_pool_size (>= 908M) if possible. > innodb_log_file_size should be (=16M) if possible, so InnoDB total log > files size equals to 25% of buffer pool size. > > Thanks, > > -- > David Sunadavid at davidsconsultants.com > > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From pub at goldshmidt.org Mon Apr 30 16:11:18 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Mon, 30 Apr 2018 16:11:18 +0300 Subject: commercial support for Debian 7 beyond LTS Message-ID: <87r2mw7sax.fsf@goldshmidt.org> Hi everyone, Does anyone provide commercial support for Debian 7 (wheezy) beyond its EOL (including LTS) on 31/5/18? Does anyone know of anyone? If yes, please feel free to contact me off list. We are interested in limited support w.r.t. security updates (including backporting of available fixes to affected wheezy packages) and maybe, though unlikely, some other *critical* bugfixes. -- Oleg Goldshmidt | pub at goldshmidt.org From pub at goldshmidt.org Mon Apr 30 16:15:01 2018 From: pub at goldshmidt.org (Oleg Goldshmidt) Date: Mon, 30 Apr 2018 16:15:01 +0300 Subject: commercial support for Debian 7 beyond LTS In-Reply-To: <87r2mw7sax.fsf@goldshmidt.org> References: <87r2mw7sax.fsf@goldshmidt.org> Message-ID: <87muxk7s4q.fsf@goldshmidt.org> Oleg Goldshmidt writes: > Hi everyone, > > Does anyone provide commercial support for Debian 7 (wheezy) beyond its > EOL (including LTS) on 31/5/18? Does anyone know of anyone? Eh, apart from Freexian (https://www.freexian.com/en/services/debian-lts.html), that is - we already know of them. > If yes, please feel free to contact me off list. > > We are interested in limited support w.r.t. security updates (including > backporting of available fixes to affected wheezy packages) and maybe, > though unlikely, some other *critical* bugfixes. Thanks a lot, -- Oleg Goldshmidt | pub at goldshmidt.org From kaplanlior at gmail.com Mon Apr 30 16:20:39 2018 From: kaplanlior at gmail.com (Lior Kaplan) Date: Mon, 30 Apr 2018 16:20:39 +0300 Subject: commercial support for Debian 7 beyond LTS In-Reply-To: <87r2mw7sax.fsf@goldshmidt.org> References: <87r2mw7sax.fsf@goldshmidt.org> Message-ID: I mailed you privately... (: On Mon, Apr 30, 2018 at 4:11 PM, Oleg Goldshmidt wrote: > > Hi everyone, > > Does anyone provide commercial support for Debian 7 (wheezy) beyond its > EOL (including LTS) on 31/5/18? Does anyone know of anyone? If yes, > please feel free to contact me off list. > > We are interested in limited support w.r.t. security updates (including > backporting of available fixes to affected wheezy packages) and maybe, > though unlikely, some other *critical* bugfixes. > > -- > Oleg Goldshmidt | pub at goldshmidt.org > > _______________________________________________ > Linux-il mailing list > Linux-il at cs.huji.ac.il > http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il > -------------- next part -------------- An HTML attachment was scrubbed... URL: From david at davidsconsultants.com Mon Apr 30 18:00:09 2018 From: david at davidsconsultants.com (David Suna) Date: Mon, 30 Apr 2018 18:00:09 +0300 Subject: Errors in syslog Message-ID: <585d62df-23bd-465e-8331-dc57a10c10ed@davidsconsultants.com> An HTML attachment was scrubbed... URL: