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
Thermopyle
Jul 1, 2003

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

What is this munin graph showing?



I mean, I get that it shows 'apache accesses', but I guess I don't understand what that is. The units seem weird to me. '500 m'? 500 million accesses per second? 500 milliseconds per second? What?

Adbot
ADBOT LOVES YOU

thebigcow
Jan 3, 2001

Bully!

quote:

The number of accesses (pages and other items served) globally on the Apache server

I don't know anything more than that.

spankmeister
Jun 15, 2008






I think it 's in milli so 500m accesses per sec is 1 access per 2 seconds.

Thermopyle
Jul 1, 2003

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

spankmeister posted:

I think it 's in milli so 500m accesses per sec is 1 access per 2 seconds.

Kind of obtuse, but yeah, that makes sense.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?
Is there a way via stateless autoconfiguration (radvd, specifically) that I can keep a specific MAC address from getting an ipv6 address?

ShoulderDaemon
Oct 9, 2003
support goon fund
Taco Defender

nitrogen posted:

Is there a way via stateless autoconfiguration (radvd, specifically) that I can keep a specific MAC address from getting an ipv6 address?

Even if there's no advertisement visible to the host, it's still going to give itself a link-local IPv6 address.

When a host connects to a network, it sends a packet requesting router advertisements. You could ignore or firewall off that packet, preventing the routers from responding. However, all routers will also send unsolicited router advertisements on a periodic basis; these are sent to a multicast address, so there's no easy way to block them from reaching one particular host unless you can setup firewalling or some such on that host.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?

ShoulderDaemon posted:

Even if there's no advertisement visible to the host, it's still going to give itself a link-local IPv6 address.

When a host connects to a network, it sends a packet requesting router advertisements. You could ignore or firewall off that packet, preventing the routers from responding. However, all routers will also send unsolicited router advertisements on a periodic basis; these are sent to a multicast address, so there's no easy way to block them from reaching one particular host unless you can setup firewalling or some such on that host.

Link-local is fine. Let me perhaps explain why i want to do this.

My google TV grabs an IPV6 address and has some sort of bug where after a while, it constantly tries to download a shitload of stuff from google's servers, constantly, over ipv6. I'd like to keep it from getting an ipv6 address to see if the problem exists over ipv4 as well.

In the stock android config, i'm unaware of any client way to avoid it from getting an ipv6 address. If you know a way to disable ipv6 in a stock (unrooted) googleTV, thats far preferable.

Otherwise, I'll probably have to learn how to do traffic shaping or something. Or just get rid of this loving thing.

I Read there's a way to do whitelisting on radvd, but i'd rather do it the other way, blacklisting instead. But from what i've read, this is a fools errand anyway, I'm just asking in case anyone else has figured out a way to do this somehow.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?
Ok, since I can't seem to keep my gtv from getting an ipv6 address, I'd like to try and rate limit all its traffic instead.

I'm not doing too well here, either.

I'm somewhat new to this, so here's what I'm trying to do, and it's not working:

code:
/sbin/tc qdisc del dev wan0 root [START FROM SCRATCH]
/sbin/tc qdisc add dev wan0 root handle 1: htb
/sbin/tc class add dev wan0 parent 1: classid 1:1 htb rate 1024kbps
/sbin/tc class add dev wan0 parent 1:1 classid 1:5 htb rate 512kbps ceil 640kbps prio 1
/sbin/tc filter add dev wan0 parent 1:0 prio 1 protocol ipv6 handle 5 fw flowid 1:5
#/sbin/ipv66tables -A OUTPUT -t mangle -p tcp --sport 80 -j MARK --set-mark 5
ip6tables -t mangle -F [[AGAIN, START FROM SCRATCH]]
ip6tables -A FORWARD -t mangle -p tcp -s 2001:470:4b:120:2a0:96ff:fe8a:fd9b/128 -j MARK --set-mark 5
But it doesnt appear to be working:

code:
class htb 1:5 parent 1:1 prio 1 quantum 51200 rate 4096Kbit ceil 5120Kbit burst 1599b/1 mpu 0b overhead 0b cburst 1999b/1 mpu 0b overhead 0b level 0
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 48828 ctokens: 39062

class htb 1:1 root rate 8192Kbit ceil 8192Kbit burst 1598b/1 mpu 0b overhead 0b cburst 1598b/1 mpu 0b overhead 0b level 7
 Sent 0 bytes 0 pkt (dropped 0, overlimits 0 requeues 0)
 rate 0bit 0pps backlog 0b 0p requeues 0
 lended: 0 borrowed: 0 giants: 0
 tokens: 24406 ctokens: 24406
I'm completely a newb at this, so any help would be appreciated...

spankmeister
Jun 15, 2008






Another approach would be to run your own DNS and filter out AAAA records so it will only use ipv4 when resolving it's DNS names.

wolrah
May 8, 2006
what?
Or if it's just for a test, disable IPv6 connectivity on that network altogether. I assume you're not putting a GoogleTV on the same network hosting important public-facing servers, so what's the harm if there's no IPv6 service for a few hours/days? Unless you just can't live without the shiny Google logo or the other easter eggs certain sites have when you connect via IPv6.

nitrogen
May 21, 2004

Oh, what's a 217°C difference between friends?
of course it's a production net! its my home network! :D

Anyway, I got the traffic control working.

/sbin/tc filter add dev wan0 parent 1:0 prio 1 protocol ip handle 5 fw flowid 1:5

Apparently, it's always type "ip" even if you are filtering ipv6. It's working now, at any rate.

NickPancakes
Oct 27, 2004

Damnit, somebody get me a tissue.

Me and a friend are sharing a VPS running Ubuntu. We have multiple domains through namecheap, using namecheap's dns host records to point everything to our VPS IP and letting nginx handle the rest as far as http is concerned.

This meets our purposes fine for http/port 80, but can anyone clue us in on how we'd properly only allow other services/ports to only be accessed via certain domains/subdomains? For example, we have teamspeak running, but as it stands we could access it via either of our domains on port 4272. We'd like to restrict it so the teamspeak server is only reached if the user is attempting to connect via a specific domain. I feel like this should be possible via iptables or hosts but I don't have the correct language for what we're trying to achieve to make googling useful.

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

bloodynose posted:

Me and a friend are sharing a VPS running Ubuntu. We have multiple domains through namecheap, using namecheap's dns host records to point everything to our VPS IP and letting nginx handle the rest as far as http is concerned.

This meets our purposes fine for http/port 80, but can anyone clue us in on how we'd properly only allow other services/ports to only be accessed via certain domains/subdomains? For example, we have teamspeak running, but as it stands we could access it via either of our domains on port 4272. We'd like to restrict it so the teamspeak server is only reached if the user is attempting to connect via a specific domain. I feel like this should be possible via iptables or hosts but I don't have the correct language for what we're trying to achieve to make googling useful.

Doubtful. Once clients resolve via DNS they're all just going to connect to the same IP. You'd need multiple IPs to pull it off, so you can tell service X to only bind to one.

JHVH-1
Jun 28, 2002

bloodynose posted:

Me and a friend are sharing a VPS running Ubuntu. We have multiple domains through namecheap, using namecheap's dns host records to point everything to our VPS IP and letting nginx handle the rest as far as http is concerned.

This meets our purposes fine for http/port 80, but can anyone clue us in on how we'd properly only allow other services/ports to only be accessed via certain domains/subdomains? For example, we have teamspeak running, but as it stands we could access it via either of our domains on port 4272. We'd like to restrict it so the teamspeak server is only reached if the user is attempting to connect via a specific domain. I feel like this should be possible via iptables or hosts but I don't have the correct language for what we're trying to achieve to make googling useful.

Don't think you can do that, as you control the source/destination address etc. in something like iptables. It doesn't inspect the packets to see how the domain was resolved. If you put a hostname in an iptables rules it resolves it when you load it and will have the same result no matter how you got to the IP. Unless you could do something weird with a proxy and pass it along or something, you would want a dedicated IP for that service and move the domain to that (or use a subdomain).

Doctor w-rw-rw-
Jun 24, 2008
The only thing that lets you do vhosts on HTTP is the Host: header, which is a HTTP-specific thing. Unless the applications themselves support some kind of name-based information (almost certainly not, btw) you're not going to be able to switch it out, because nobody connects to hostnames, they always connect to IPs that they resolved.

wolrah
May 8, 2006
what?
Certain services, and I want to stress that this depends entirely on client implementation so a service with numerous third-party clients may be unreliable at best with this, support the use of DNS SRV records so users only have to enter a domain name but can be told by the SRV record to connect to a non-standard port.

It won't allow you to run different services on the same port, but if what you want to run supports it you can at least have different instances on non-standard ports for each user/domain/whatever.

TeamSpeak supports SRV records, apparently: http://support.teamspeakusa.com/index.php?/Knowledgebase/Article/View/293/12/does-teamspeak-3-support-dns-srv-records

vulgey
Aug 2, 2004

Covered in blood and without any clothes. Where is my mother?
Anybody know of a way to do wildcard cache purges in Squid? I'm aware the official word is "you can't" but I'm sure there's someone else out there that accidentally cached a huge part of their site for 6 months and deleting the entire cache is not an option...

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise
I made a typo in /etc/fstab and rebooted and it's throwing me into "disk recovery mode"

I need to change 2 loving letters but for some reason the goddamn files are set to read only even as root so I can't change the one thing I need to

The one change that would let me boot properly.

The one change that it's demanding that I make.

Thanks Red Hat.

Adult Sword Owner fucked around with this message at 19:45 on May 8, 2013

wolrah
May 8, 2006
what?
You probably just need to remount as R/W. Most "recovery" type modes I've seen mount disks as RO by default in the interest of protecting any data that may need to be retrieved from the disk.

hackedaccount
Sep 28, 2009
mount -o rw,remount /
vi /etc/fstab

Doctor w-rw-rw-
Jun 24, 2008

wolrah posted:

You probably just need to remount as R/W. Most "recovery" type modes I've seen mount disks as RO by default in the interest of protecting any data that may need to be retrieved from the disk.

Yeah, what he said. If it can't parse fstab then its other option is to mount / and hope for the best. Last thing you want is for anything to write to disk in case it's wrong or corrupt somehow else. Mounting read only is the right thing here.

Remount it to read/write then edit fstab.

Adult Sword Owner
Jun 19, 2011

u deserve diploma for sublime comedy expertise
Welp don't I feel like an idiot. Thanks, that worked.

spankmeister
Jun 15, 2008






Yesterday I made a bridge device and moved the ip config from eth0 to the br0 but forgot to install bridge utils so when I rebooted I locked myself out. :suicide:

other people
Jun 27, 2004
Associate Christ
http://sprunge.us/ZPFD

Has btrfs finally failed me? :( :( :(

Longinus00
Dec 29, 2005
Ur-Quan

Kaluza-Klein posted:

http://sprunge.us/ZPFD

Has btrfs finally failed me? :( :( :(

Going to need more context there, stuff like kernel and btrfs-tools version for instance.

Lysidas
Jul 26, 2002

John Diefenbaker is a madman who thinks he's John Diefenbaker.
Pillbug
Well, btrfsck has certainly failed you. I assume you're doing this because your btrfs filesystem no longer mounts?

Anyway, this looks like a Fedora 18 live CD. Kernel is 3.6.10-4, btrfs --version gives a spectacularly unhelpful "v0.19". I would compile a new version of btrfsck from git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git and try that. If all else fails, you'll need to use btrfs-restore to extract your data from what's left of the filesystem.

hackedaccount
Sep 28, 2009
If you have the time and energy you might want to submit a bug report or post on the mailing list so the developers can use your information to make the product better.

YouTuber
Jul 31, 2004

by FactsAreUseless
I think I've googled nearly every possible site on this and I can't seem to come to a conclusion. I'm using ffmpeg to stream to twitch.tv. Everything initially worked out flawlessly then suddenly after a reboot it stopped streaming audio aside from the microphone. Music Players, Games, nothing seems to show up in the stream. I'm not the only one with this problem, ffmpeg seems to be the only choice. VLC apparently is just a fancy GUI scheme for running it through ffmpeg and from what I've read it still has the same problem with audio.

code:
   INRES="1920x1080"                                            # input resolution
   OUTRES="1280x720"                                           # Output resolution
   FPS="35"                                                    # target FPS
   QUAL="fast"                                               # one of the many FFMPEG preset on (k)ubuntu found in /usr/share/ffmpeg
                                                               # If you have low bandwidth, put the qual preset on 'fast' (upload bandwidth)
                                                               # If you have medium bandwitch put it on normal to medium
   STREAM_KEY="live_a_string_of_numbers_here"   # This is your stream key generated by jtv/twitch found at: [url]http://www.justin.tv/broadcast/adv_other[/url]

   ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -vpre "$QUAL" -s "$OUTRES" -acodec libmp3lame -ar 44100 -threads 4 -qscale 5 -b 1024k 
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY"
It's pulling from Alsa just fine. However, nothing from Pulseaudio seems to be working. Most solutions out there seem to be about making a loopback feed but I see no options in pavucontrol. I know I'm overlooking something simple here.

YouTuber fucked around with this message at 02:11 on May 9, 2013

greazeball
Feb 4, 2003



I have a problem that I've posted on ubuntuforums and in the Precise Pangolin thread but I haven't got any replies so I'll try here too.

I'm trying to print to pdf through the wordle.net java applet and it's totally unresponsive. Just nothing happens. Is this a bug with java, Chrome/Firefox, CUPS? I can't really find anything about it other than Mac users can't print because Java doesn't have permission to access hardware and there's a fix for that here: http://www.wordle.net/macprint

Any help anyone can offer is greatly appreciated.

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

YouTuber posted:

I think I've googled nearly every possible site on this and I can't seem to come to a conclusion. I'm using ffmpeg to stream to twitch.tv. Everything initially worked out flawlessly then suddenly after a reboot it stopped streaming audio aside from the microphone. Music Players, Games, nothing seems to show up in the stream. I'm not the only one with this problem, ffmpeg seems to be the only choice. VLC apparently is just a fancy GUI scheme for running it through ffmpeg and from what I've read it still has the same problem with audio.

code:
   INRES="1920x1080"                                            # input resolution
   OUTRES="1280x720"                                           # Output resolution
   FPS="35"                                                    # target FPS
   QUAL="fast"                                               # one of the many FFMPEG preset on (k)ubuntu found in /usr/share/ffmpeg
                                                               # If you have low bandwidth, put the qual preset on 'fast' (upload bandwidth)
                                                               # If you have medium bandwitch put it on normal to medium
   STREAM_KEY="live_a_string_of_numbers_here"   # This is your stream key generated by jtv/twitch found at: [url]http://www.justin.tv/broadcast/adv_other[/url]

   ffmpeg -f x11grab -s "$INRES" -r "$FPS" -i :0.0+0,0 -f alsa -ac 2 -i pulse -vcodec libx264 -vpre "$QUAL" -s "$OUTRES" -acodec libmp3lame -ar 44100 -threads 4 -qscale 5 -b 1024k 
-f flv "rtmp://live.justin.tv/app/$STREAM_KEY"
It's pulling from Alsa just fine. However, nothing from Pulseaudio seems to be working. Most solutions out there seem to be about making a loopback feed but I see no options in pavucontrol. I know I'm overlooking something simple here.
Are you sure your settings in pulse audio control are correct? Did you check if it muted itself? My pulse sometimes does that.
Remember "Monitor of whatever device" is the buildin loopback for system recording. "Whatever device" is the device's microphone.
You recording tab should look like this:

Only registered members can see post attachments!

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
Has anyone run across a good description of /proc/self/mountstats? The best I've been able to do is look through the source for mountstats.py, but it's still missing a whole pile of fields (specifically, almost all the numbers next to a named RPC call).

sunaurus
Feb 13, 2012

Oh great, another bookah.
Does anybody know about running multiple X servers at the same time? I'm pretty new at this, but I was told to run steam (the wine version) in a seperate X server so that alt-tabbing doesn't mess up my games. It pretty much works, but the only problem is, whenever I switch to my main desktop with ctrl alt f1 when playing a game (mostly dota 2), it seems to freeze the game until I switch back, and this generally makes me disconnect from the server I'm in. Is this supposed to happen no matter what, or is there some way I could make it continue running in the background while I switch to my desktop?

VictualSquid
Feb 29, 2012

Gently enveloping the target with indiscriminate love.

Illegal Move posted:

Does anybody know about running multiple X servers at the same time? I'm pretty new at this, but I was told to run steam (the wine version) in a seperate X server so that alt-tabbing doesn't mess up my games. It pretty much works, but the only problem is, whenever I switch to my main desktop with ctrl alt f1 when playing a game (mostly dota 2), it seems to freeze the game until I switch back, and this generally makes me disconnect from the server I'm in. Is this supposed to happen no matter what, or is there some way I could make it continue running in the background while I switch to my desktop?
You can make your display manager start several X server. It is hidden somewhere in the options.
For gdm you go to gdmsetup->Security->Configure X Server and then you add a second server with the same settings as the first one.
For me they end up on ctrl-alt-f7 and ctrl-alt-f8.
I usually use those to try out fancy window manager stuff, so I just log in the second server with a different wm than in the first one.

If you want to go for maximal separation you could also create a second user to log in on the second server.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Illegal Move posted:

it seems to freeze the game until I switch back, and this generally makes me disconnect from the server I'm in. Is this supposed to happen no matter what, or is there some way I could make it continue running in the background while I switch to my desktop?

Unfortunately, this isn't possible without fixing the X server. A lock is taken when VT switching that pauses all GLX clients.

Running your games in another X server isn't really something you should be doing.

hackedaccount
Sep 28, 2009

Misogynist posted:

Has anyone run across a good description of /proc/self/mountstats? The best I've been able to do is look through the source for mountstats.py, but it's still missing a whole pile of fields (specifically, almost all the numbers next to a named RPC call).

I took a look at it on my CentOS 6.4 box and it looks like /etc/mtab but I don't see any numbers in /proc/self/mountstats .

Maybe something like nfsstat is what you're looking for?

hackedaccount
Sep 28, 2009
Any SELinux people out there? What's the difference between doing a "semanage fcontext" and then a "restorecon" vs doing just a "chcon"? If I understand it right doing semanage then restorecon somehow permanently stores the semanage change ("/foo's default is now public_content_t") and then the restorecon restores it to it's default (now public_content_t). chcon just straight up changes it and if you were to do a restorecon after the chcon it would restore it to whatever the current default is (say public_content_rw_t or whatever).

Is that correct? The "proper" way is to semanage then restorecon, but chcon would essentially give the same end result minus changing that directory's default context.

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

hackedaccount posted:

Any SELinux people out there? What's the difference between doing a "semanage fcontext" and then a "restorecon" vs doing just a "chcon"? If I understand it right doing semanage then restorecon somehow permanently stores the semanage change ("/foo's default is now public_content_t") and then the restorecon restores it to it's default (now public_content_t). chcon just straight up changes it and if you were to do a restorecon after the chcon it would restore it to whatever the current default is (say public_content_rw_t or whatever).

Is that correct? The "proper" way is to semanage then restorecon, but chcon would essentially give the same end result minus changing that directory's default context.

You can semanage then chcon as well. The real difference is that you'll have a bad time if something relabels the filesystem after chconning a bunch of files.

other people
Jun 27, 2004
Associate Christ

Lysidas posted:

Well, btrfsck has certainly failed you. I assume you're doing this because your btrfs filesystem no longer mounts?

Anyway, this looks like a Fedora 18 live CD. Kernel is 3.6.10-4, btrfs --version gives a spectacularly unhelpful "v0.19". I would compile a new version of btrfsck from git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git and try that. If all else fails, you'll need to use btrfs-restore to extract your data from what's left of the filesystem.

Yeah, mounting segfaults, so I was using an F18 live cd. koji thankfully had a btrfs-progs rpm built from git on May 1, but it does no better.

I would love to dig deeper into why this happened, but this is my work laptop and I need it to be back on track asap. I don't even have a spare disk large enough to dump a btrfs restore or dd on, anyway :(


edit: I just remembered my wife's macbook has a 'giant' 250GB hard disk that is mostly empty. I have mounted it as a cifs share and btrfs restore is seemingly dumping files galore into it. All is not lost, it seems!

I really wish I knew if this whole thing was a freak accident or if it relates at all to the new SSD I am using...

other people fucked around with this message at 18:18 on May 9, 2013

Vulture Culture
Jul 14, 2003

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

hackedaccount posted:

minus changing that directory's default context
Which is really almost the entire reason to be running SELinux in the first place.

Adbot
ADBOT LOVES YOU

hackedaccount
Sep 28, 2009

evol262 posted:

You can semanage then chcon as well. The real difference is that you'll have a bad time if something relabels the filesystem after chconning a bunch of files.

Perfect, thanks.

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