Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
How can I make iSCSI targets to connect automatically in (Arch) Linux? I have node.startup set to automatic in iscsid.conf and done the discovery and login sing and dance with iscsiadm. That's what every tutorial says, but after rebooting, nothing.

--edit: drat Arch Linux package is from mid 2014 and the Open-iSCSI website has been abandoned. What in the gently caress!

Combat Pretzel fucked around with this message at 18:45 on Jan 10, 2016

Adbot
ADBOT LOVES YOU

Chuu
Sep 11, 2004

Grimey Drawer

evol262 posted:

Judging from the tags, that will never go into the main repo.

That package is tagged for the SCLo SIG (centos software collections). You should ask someone on that SIG when they plan to publish the packages. The -candidate tag is a good sign, but ask, especially because there appear to be some problems with devtoolset-4, and that build was from testing a potential fix.

Thanks for the reply. Do you know how centos decides what makes it to the main repo and what's avaliable via scl? On RHEL you get the devtoolset package like any other package.

Chuu fucked around with this message at 18:41 on Jan 10, 2016

evol262
Nov 30, 2010
#!/usr/bin/perl

Combat Pretzel posted:

How can I make iSCSI targets to connect automatically in (Arch) Linux? I have node.startup set to automatic in iscsid.conf and done the discovery and login sing and dance with iscsiadm. That's what every tutorial says, but after rebooting, nothing.

--edit: drat Arch Linux package is from mid 2014 and the Open-iSCSI website has been abandoned. What in the gently caress!

Can you post iscsi.conf?

Chuu posted:

Thanks for the reply. Do you know how centos decides what makes it to the main repo and what's avaliable via scl? On RHEL you get the devtoolset package like any other package.

Software collections aren't part of the base RHEL repos, either, and need to be manually added with scl, last time I checked.

CentOS needs centos-release-scl installed, which adds another repo.

SCL packages come from that repository (centos-sclo-rh/7/$arch).

Packages tagged as -release can be attached to errata, and are released once the errata ships (or the package is manually pushed to the repos). CentOS doesn't generally release their own errata (except for CentOS plus/extras), so it should get pushed once it's signed. I'd have to look up their process, but it appears that the CentOS SCL SIG may have push rights to the scl repo. You should ask on the SCL mailing list, unless you want to wait a day, when I'll have time to check out the process in detail.

The current build is not tagged -release, which is a bad sign.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!

evol262 posted:

Can you post iscsi.conf?
The iscsi.conf is correct.

I actually found the "issue". I went through the source code and found it. The problem is that there's a FIXME comment section in the initiator, where the code to do this is supposed to be. But isn't. The drat open-iscsi code is unable to do what advertised and mount targets with node.startup=automatic. Turns out most other distributions made it work by amending their init scripts and call iscsiadm manually (currently looking at Ubuntu's init scripts). Except Arch Linux didn't care, probably because their package was an halfassed community contribution. It just starts iscsid and does none of the scripted stuff to make them automount (pretty much just calling iscsiadm -m node --loginall=automatic at the right time). I'm currently trying to find Fedora's code, to see how I can make this work with systemd. Assuming Fedora "fixed" it, too.

God, I spent way too much time on this idiotic issue.

--edit:
Wrote a systemd manifest that does the iscsiadm stuff after the iscsid.service comes up, now it works.

Combat Pretzel fucked around with this message at 22:48 on Jan 10, 2016

Jerry Bindle
May 16, 2003
I'm having trouble with java+serial+linux. I see the serial adapter as /dev/ttyUSB0, which belongs to the 'dialout' group. I added my user account to the 'dialout' group, and can talk to the serial port through programs like picocom.

However, talking to the port through java has a problem. I get this error,

quote:

�.�[ testRead() Lock file failed
check_group_uucp(): error testing lock file creation Error details:Permission deniedcheck_lock_status: No permission to create lock file.
RXTX fhs_lock() Error: opening lock file: /var/lock/LCK..ttyS15: Permission denied. FAILED TO OPEN: No such file or directory

which is expected given the permissions of /var/lock/ are this,

quote:

0 drwxr-xr-x. 7 root root 160 Jan 12 09:56 lock

I know better than to just start changing perms and ownership of directories like this one, but I see two options: change the group of /var/lock to 'lock', then add the user to the lock group, -or- use another java library.

  • Fedora 23
  • nrjavaserial-3.9.3.1
  • java 1.8.0_65

Docjowles
Apr 9, 2009

Is the location that the Java app uses for its lockfile configurable? You could create /var/lock/whatever/ owned by the user/group that this application runs under and use that.

Jerry Bindle
May 16, 2003

Docjowles posted:

Is the location that the Java app uses for its lockfile configurable? You could create /var/lock/whatever/ owned by the user/group that this application runs under and use that.

It is indeed, through a #define in the C source. That may be an acceptable solution. Thanks!

https://github.com/NeuronRobotics/nrjavaserial/blob/86b44454cebc7ba29c2032e904cfbe4eb098b841/src/main/c/include/SerialImp.h#L370-L372

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin
Anyone familiar with Icinga?

I need to learn about it fast, and I'm primarily a Windows guy.

Any advice? Can I basically assume that any resources for Nagios will 95% apply?

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Dr. Arbitrary posted:

Anyone familiar with Icinga?

I need to learn about it fast, and I'm primarily a Windows guy.

Any advice? Can I basically assume that any resources for Nagios will 95% apply?
Yeah, it's very near 100%. Basic tips:

- think of the object relationships from a relational database standpoint and you'll be totally fine
- template everything or you'll go insane
- user macros (Nagios 3.0+ feature) make complex configurations much saner; abuse the poo poo out of them
- don't even think about push-based (NSCA) health checks without some kind of configuration management in place
- output your performance data someplace where you can do something useful with it (e.g. Graphite)

Dr. Arbitrary
Mar 15, 2006

Bleak Gremlin

Vulture Culture posted:

Yeah, it's very near 100%. Basic tips:

- think of the object relationships from a relational database standpoint and you'll be totally fine
- template everything or you'll go insane
- user macros (Nagios 3.0+ feature) make complex configurations much saner; abuse the poo poo out of them
- don't even think about push-based (NSCA) health checks without some kind of configuration management in place
- output your performance data someplace where you can do something useful with it (e.g. Graphite)

My first reaction to reading this was "I'm hosed"

But after taking some time to look through what's already in place, I think I'll be okay.

I barely understand databases so I guess that's something I have to learn more about.

Templates seem like a smart idea.

I'm going to have to learn more about user macros, where can I get started on that?

As far as I can tell, everything is pull based.

Graphite is already planned.

I'm working with a bunch of Linux guys and I'm supposed to help get it working for windows clients, I think I'll make it :)

Roargasm
Oct 21, 2010

Hate to sound sleazy
But tease me
I don't want it if it's that easy
Anyone use collectl for perf data collection? I've got a ~2.5M .raw.gz file that I can play back to stdout, but I'm looking to export it to a plottable format that I can use to graph with colplot or gnuplot or whatever for our devs here. I've read the documentation, and from what I can tell the syntax to generate a plottable file would be collectl -P -f/path/to/my.raw.gz

Doing this creates a .tab.gz file in the destination dir, but the command runs without any progress indicator (and has been doing so for at least 45 min on my VM) The .tab.gz file still reads as 0bytes. Using Debian8.2 for this.

RFC2324
Jun 7, 2012

http 418

Roargasm posted:

Anyone use collectl for perf data collection? I've got a ~2.5M .raw.gz file that I can play back to stdout, but I'm looking to export it to a plottable format that I can use to graph with colplot or gnuplot or whatever for our devs here. I've read the documentation, and from what I can tell the syntax to generate a plottable file would be collectl -P -f/path/to/my.raw.gz

Doing this creates a .tab.gz file in the destination dir, but the command runs without any progress indicator (and has been doing so for at least 45 min on my VM) The .tab.gz file still reads as 0bytes. Using Debian8.2 for this.

You can always attach an strace to see if its doing anything, and where its hanging if it is failing.

reading
Jul 27, 2013
Nvidia driver under Xubuntu problem:

I tried to upgrade my Nvidia driver to a newer version because my new monitor was having problems. To do that, I have to disable lightdm so I ssh'd into my computer from a laptop, stopped the lightdm service, and applied the Nvidia driver using their run program and following the prompts.

Once that was finished I restarted and tried to restart the lightdm service, but it won't restart for several tries. Then it occaisionally does say that the service got restarted, but my monitors stay dark. What's going on here? Even when lightdm says it's working there's nothing happening on the blank screens. I can't even get a login screen to show up.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Sweet mother of God, I've had a fresh install of Ubuntu 15.10 with Gnome Shell running and then an apt-get upgrade completely hosed it over. Seriously?!

RFC2324
Jun 7, 2012

http 418

Combat Pretzel posted:

Sweet mother of God, I've had a fresh install of Ubuntu 15.10 with Gnome Shell running and then an apt-get upgrade completely hosed it over. Seriously?!

I've had this problem more often than I like to think with Ubuntu and its variants. One of the reasons I don't use them often, even tho Kubuntu is generally my favorite distro.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Eh, I've redone all my steps but pulled a dist-upgrade instead of a normal upgrade, and it didn't get hosed up. I suppose I'll do that every time now. Since I run the disk on my NAS, as soon I had everything set up and successfully reboot, I immediately hammered the snapshot button like there's no tomorrow.

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Having a bunch of NFS issues. What's the reason it'd deny any operations on files unless they have the executable permissions set? Files that get created on the NFS share get these automatically, but if I try to copy files to it that don't have a+x results in an operation not permitted.

DeaconBlues
Nov 9, 2011

Combat Pretzel posted:

Having a bunch of NFS issues. What's the reason it'd deny any operations on files unless they have the executable permissions set? Files that get created on the NFS share get these automatically, but if I try to copy files to it that don't have a+x results in an operation not permitted.

Are you working on copying/moving whole directories?


See my earlier discussion, when I learned that executable privileges were necessary for some directory operations:

http://forums.somethingawful.com/showthread.php?threadid=2389159&userid=0&perpage=40&pagenumber=575#post454200473

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Single files, haven't tried directories. I have "fixed" it by telling FreeNAS to use NFS4 (was running NFS3 until now for whatever reason), now I can copy files nilly willy from local to remote storage regardless of permissions.

Salt Fish
Sep 11, 2003

Cybernetic Crumb
I'm running Fedora 22 with gnome and I really like that when you press and release the left super key that you can see all your windows spread out. I got a new keyboard though that only has the right super key. I tried to use xmodmap to copy left super over to right super, but it seems that gnome implements this weird functionality at a lower level than xmodmap is able to touch because while my key combos work the press and release doesn't.

Is there a way to change the behavior of gnome to allow right super to bring up this view of my open windows? Failing that can I rebind a combination of keys to do the same thing? I reviewed all the bindable shortcuts in keyboard config but didn't see any option for setting it.

evol262
Nov 30, 2010
#!/usr/bin/perl
Did you rebind it to mod4? Because that should be the event being sent.

Salt Fish
Sep 11, 2003

Cybernetic Crumb

evol262 posted:

Did you rebind it to mod4? Because that should be the event being sent.

I think so, here is my before and after:


code:
$ xmodmap -pke | grep -wA1 $((0x85))
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R


$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
$ xmodmap -e "keycode 134 = Super_L NoSymbol Super_L"
code:

$ xmodmap -pke | grep -wA1 $((0x85))
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_L NoSymbol Super_L

$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_L (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

Salt Fish fucked around with this message at 17:18 on Jan 19, 2016

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
How can I run a script from within a GDM/Gnome Shell session, so that it shuts down GDM and then continues to do stuff? Essentially, how can I spawn it in background and not get killed as soon GDM effectively shuts down?

evol262
Nov 30, 2010
#!/usr/bin/perl

Combat Pretzel posted:

How can I run a script from within a GDM/Gnome Shell session, so that it shuts down GDM and then continues to do stuff? Essentially, how can I spawn it in background and not get killed as soon GDM effectively shuts down?

nohup

Salt Fish posted:

I think so, here is my before and after:


code:
$ xmodmap -pke | grep -wA1 $((0x85))
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_R NoSymbol Super_R


$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
$ xmodmap -e "keycode 134 = Super_L NoSymbol Super_L"
code:

$ xmodmap -pke | grep -wA1 $((0x85))
keycode 133 = Super_L NoSymbol Super_L
keycode 134 = Super_L NoSymbol Super_L

$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_L (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

What does xev show when you press it?

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
Seems like it gets killed when I run systemctl isolate.

Apparently I have to jump between the multi-user and graphical systemd targets, because simply halting and restarting GDM doesn't work and gets it hung up, because it's a fickle bitch. I suppose I could try lightdm instead.

--edit: Yeah, I can start and stop lightdm nilly-willy without it being a pain in the rear end as GDM is being.

Combat Pretzel fucked around with this message at 20:16 on Jan 19, 2016

Salt Fish
Sep 11, 2003

Cybernetic Crumb

evol262 posted:

nohup


What does xev show when you press it?

I reverted my map back to the default (I suspect that doesn't matter since the map works a layer above the event?) and then ran xev:

code:
KeyPress event, serial 32, synthetic NO, window 0x1800001,
    root 0x2cc, subw 0x0, time 1152301864, (1071,866), root:(1108,940),
    state 0x0, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1800001,
    root 0x2cc, subw 0x0, time 1152301920, (1071,866), root:(1108,940),
    state 0x40, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Thanks again for looking at this, it's really cool that you field these questions for people.

evol262
Nov 30, 2010
#!/usr/bin/perl

Salt Fish posted:

I reverted my map back to the default (I suspect that doesn't matter since the map works a layer above the event?) and then ran xev:

code:
KeyPress event, serial 32, synthetic NO, window 0x1800001,
    root 0x2cc, subw 0x0, time 1152301864, (1071,866), root:(1108,940),
    state 0x0, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 35, synthetic NO, window 0x1800001,
    root 0x2cc, subw 0x0, time 1152301920, (1071,866), root:(1108,940),
    state 0x40, keycode 134 (keysym 0xffec, Super_R), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
Thanks again for looking at this, it's really cool that you field these questions for people.

Suspicious Dish can/may chime in, but I don't see any reason why Gnome would be dealing with mappings at some level separate from/above X, but you should note that xkb is the preferred way to remap. What distro are you using?

Salt Fish
Sep 11, 2003

Cybernetic Crumb

evol262 posted:

Suspicious Dish can/may chime in, but I don't see any reason why Gnome would be dealing with mappings at some level separate from/above X, but you should note that xkb is the preferred way to remap. What distro are you using?

Fedora 22. I thought maaaybe the reason for handing it outside of x was that super is a modifier ordinarily while the shortcut is a simple press/release. However, my knowledge on that is very sketchy.

evol262
Nov 30, 2010
#!/usr/bin/perl

Salt Fish posted:

Fedora 22. I thought maaaybe the reason for handing it outside of x was that super is a modifier ordinarily while the shortcut is a simple press/release. However, my knowledge on that is very sketchy.

Modifiers also send keydown/keyup. It's just bound as /org/gnome/mutter/overlay-key (you can also edit this with dconf-editor to just rebind it to Super_R with dconf-editor if you want)

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Yeah, mutter uses the keycode, not the keysym. This is intentional.

https://git.gnome.org/browse/mutter/commit/src/core/keybindings.c?id=28859c604fa3cc12353c8f7b6981466195649692

waffle iron
Jan 16, 2004

Combat Pretzel posted:

Seems like it gets killed when I run systemctl isolate.

Apparently I have to jump between the multi-user and graphical systemd targets, because simply halting and restarting GDM doesn't work and gets it hung up, because it's a fickle bitch. I suppose I could try lightdm instead.

--edit: Yeah, I can start and stop lightdm nilly-willy without it being a pain in the rear end as GDM is being.

Any process started in the graphical systemd target can't really escape an isolate. I think your best best is run in the transient scope using systemd-run

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

I've got a directory of log files for Program X. Program X creates a new log file several times a day in this directory and I want a command similar to tail -f, but I want it to automatically move on to the latest log file when Program X stops writing to one and switches to the next.

Is there any simple way to do that?

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
e: never mind, misread

evol262
Nov 30, 2010
#!/usr/bin/perl

Thermopyle posted:

I've got a directory of log files for Program X. Program X creates a new log file several times a day in this directory and I want a command similar to tail -f, but I want it to automatically move on to the latest log file when Program X stops writing to one and switches to the next.

Is there any simple way to do that?

Have it write to a normal logfile with a consistent name, logrotate it whenever, and use tail -F.

You could write a trivial script in any language you want with strftime or datetime (python) or whatever, but there's no reason to re-invent the wheel if you don't need to

Combat Pretzel
Jun 23, 2004

No, seriously... what kurds?!
When I disable all outputs of a specific graphics card with xrandr, does Xorg turn it off entirely and eventually release it and the driver? If I re-enable them with xrandr, does it reload the driver on the spot or does it expect it to be ever so running?

Anyone following the virtualization thread noticed I'm going on and on about VGA passthrough. I've come around a bunch of other scripts that mess about with xrandr, from how I read things disabling a specific card of the two in the system, let it do its thing, and then pull it back into Xorg without ever leaving the session. That suggests to me that Xorg can kind of do hotplugging in a messy way?

evol262
Nov 30, 2010
#!/usr/bin/perl
The driver is still loaded unless you have an explicit Devices section in xorg.conf, as far as I know.

The other problem is that the kernel driver (which is different from the xorg driver) is still going to grab/initialize the card, regardless of what xorg is doing. xorg can hotplug it as long as the device shows up on the bus, but removing it from the bus is going to be the problem. You can unload the kernel driver, but I suspect that PCI memory space from initialization is still going to be a problem (I'd need to test)

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

evol262 posted:

Have it write to a normal logfile with a consistent name, logrotate it whenever, and use tail -F.

You could write a trivial script in any language you want with strftime or datetime (python) or whatever, but there's no reason to re-invent the wheel if you don't need to

Yeah, I don't have any control over how it writes the log files. Was just wondering if there's a simple way of doing what I want.

I'll just write a script.

Powered Descent
Jul 13, 2008

We haven't had that spirit here since 1969.

Thermopyle posted:

Yeah, I don't have any control over how it writes the log files. Was just wondering if there's a simple way of doing what I want.

I'll just write a script.

An actual script would be way overkill.

code:
alias mylogtail='tail -f $(ls -t /path/to/files/logfilename* | head -n 1)'
Toss that in your .bashrc and you're done. Type mylogtail and you're tailing the newest file.

e: Or did you mean you wanted to leave it running all day and have it automatically hop to the next file when it's created? Because yeah, that's a lot more complicated and script-worthy.

Powered Descent fucked around with this message at 02:09 on Jan 21, 2016

Hughmoris
Apr 21, 2007
Let's go to the abyss!
I'm new to Linux, and just installed Ubuntu 14 on a virtualbox. I am playing around with Perl 6 and one of the modules requires Gumbo Parser, found here: https://github.com/google/gumbo-parser

How do I go about installing that? I'm not really understanding the installation instructions.

Adbot
ADBOT LOVES YOU

evol262
Nov 30, 2010
#!/usr/bin/perl

Hughmoris posted:

I'm new to Linux, and just installed Ubuntu 14 on a virtualbox. I am playing around with Perl 6 and one of the modules requires Gumbo Parser, found here: https://github.com/google/gumbo-parser

How do I go about installing that? I'm not really understanding the installation instructions.

git clone it, then "./autogen.sh && configure && make && make install". Then use HTML::Gumbo (which appears to be the CPAN module)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply