/srv/irclogs.ubuntu.com/2022/05/11/#ubuntu-server.txt

yurtesenutkarsh2102 I do not know why you got a response right away but not me. :) maybe you should have sent e-mail.09:50
arkanoidhello! I was happily using ubuntu sever headless when I was requested to add desktop capability for a specific demostration10:09
arkanoidI've installed it and I have gnome up ad running, but desktop is limited to 1024x748 10:10
arkanoidthis is lshw https://termbin.com/k1k110:10
arkanoidgnome says that graphis is llvmpipe10:10
arkanoidI'd like to enable normal resolution and intel iGPU acceleration10:11
kazaaakasHello, guys, i faced with problem .. how tu use certbot that hi makes 000-default.conf to SSL? I wanna that sameone try open with browser my server IP it's open /var/www/html/ folder index.html file with SSL (https) support. My question related with Ubuntu 20.04, Apache2, Certbot.10:41
arkanoidsolved by using HWE kernel. The iGPU is too modern for default 20.04 kernel12:22
bittinhttps://www.brighttalk.com/webcast/6793/541159 Ubuntu server talk soon :)15:28
bittinseems to not start in time :(16:01
bittinah now just a minute late16:01
* bittin is watching16:08
fooI've got a 9GB log file. I need to split it up, and compress them / gunzip them... any tools/suggestions to help with this?16:24
foologrotate, perhaps? /me investigates 16:24
cokeyea that's what logrotate does but systemd is going away from text log files  16:30
foocoke: ok, thanks16:34
foolooks like split can do what I want in the short immediate term 16:34
fooI think I can split files, specify a filesize, then gunzip it - how does that sound? 16:34
fooI'm trying to figure out the size to split on16:34
cokejust look at the log rotate configs of other services? 16:35
cokein /etc/logrotate.d/16:36
foocoke: ah, good idea, thanks16:36
foorotate 14 ... might be 14 days... *checks help16:37
cokeyou have to tell the deamon to reload usually so it starts using the new file 16:37
cokemaybe you can find one for the service you want to work with already somewhere?16:37
cokekeeping log files round is usually the backup servers job 16:38
foocoke: thank you for the help, really appreciate it 16:39
foocoke: this is a service we wrote, we append text to the .log file - it's 9GB now, been running for 6 months 16:40
fooaha, rotate 14 says "keep 14 archived log files" 16:40
foocoke: ifi logrotate is moving away from text files, should I be looking at something else? 16:44
cokelog rotate will stay log rotate 16:44
foocoke: aha, ok. 16:44
cokebut less services use it these days cause they use journalctl16:45
foocoke: ohhhh. do you recommend one over the other? Still learning the ropes here16:52
cokeif you want to log into a file log rotate is the way to go 16:53
cokebut on very busy systems and if your service is running on more than one server there are better options 16:54
foocoke: cool. thanks. 16:54
cokebut since you just found out about a 6m old log file I think that's not your issue :)16:55
foocoke: I don't think logrotate will retroactively do things, so I probably need to manually split that file 16:56
cokenah you should move the large file away and compress it elsewhere 16:57
foocoke: surprised gunzip app.txt doesn't work: gunzip: app.txt: unknown suffix -- ignored16:58
fooalso tried gunzip app.log 16:58
sdezielfoo: `gzip app.txt` will give you a compressed file named `app.txt.gz`. `gunzip` is to decompress17:02
foosdeziel: facepalm, this guide https://www.geeksforgeeks.org/gunzip-command-in-linux-with-examples/ is wrong. thank you.17:03
foosdeziel: if I run gzip file.log on a 9GB file, and if I only have 2GB free space, will that be an issue? *thinks17:10
sdezielfoo: possibly :/17:11
cokedepends on the log file and how well it compresses 17:11
sdezielfoo: but usually, text compresses very well17:11
fooI suppose gzip will throw an error if it happens? I simply didn't want it to throw an error17:12
cokeit will write the .gz until it runs out of space and only delete the uncompressed file if it succeeds 17:12
fooI mean, I simply didn't want it to crash the server17:12
sdezielfoo: before you compress it, I'd make sure the service no longer writes to it17:13
sdezielfoo: otherwise, you'll get a "phantom" file of 9G and growing + the gzip'ed copy17:13
cokeif the service keeps the file open 17:14
fooerr, this is now throwing a production error17:14
foosince 2.5G is so low...17:14
foomy options: A) run gzip on the large file now (it is not being written to)17:14
foowill gzip cvrash the server17:15
cokeif the server crashes if the disk gzip is writing on is full: yes 17:17
foook, I'm transferring this to another system now.17:17
fooWill gzip this on another system, thanks ya'll.17:17
cokelogging to / or the same partition/volume/disk your service needs space on is a very bad idea 17:18
foocoke: oh? I can change that, never thought about that.17:19
foocoke: why?17:19
fooplease excuse the possibly noob question17:19
foo35% done downloading, so, close.17:19
fooWhat, this is odd. I cleared the space, still getting OSError: [Errno 28] No space left on device: '/dev/shm/tmpb8ywrww2'17:27
cokereload the service writing the log 17:28
sdezielfoo: are you 100% the service no longer holds the old log file open?17:28
foosdeziel: yes, I've restarted the server, I think that should have done it17:28
fooalso restarted nginx and postgersql17:28
foopostgresql17:28
foounless it is hanging *checks17:29
foonope, uh, about to do a reboot unless someone has another thought. odd.17:29
sdezielfoo: you can check with `grep deleted /proc/$pid/maps` and see if the if the old log is there ($pid is the PID of your service)17:30
foosdeziel: nothing17:30
fooI can also see from ps aux the timestamp shows the service was rebooted within the past 2 minutes17:30
sdezielfoo: typically /dev/shm is it's own mountpoint (not using the rootfs)17:31
sdeziela tmpfs IIRC17:31
sdezielwhich has 50% of the RAM as size limit17:31
foodf -h shows I have 12G available 17:31
sdezielis that ^ for "/" or "/dev/shm" ?17:32
foosdeziel: https://bpa.st/6WWQ17:32
foosdeziel: /dev/vda1 17:32
sdezielfoo: => tmpfs           992M  992M     0 100% /dev/shm17:33
foosdeziel: how do I reset that? I did see that17:33
foo(but we have 4G RAM)17:33
foo*thinks17:33
sdezielfoo: `free -mt` will tell you17:33
fooMaybe stuff got stuck when I ctrl+c 'd gzip file.txt 17:33
foosdeziel: https://bpa.st/JL4A17:33
sdezielfoo: as for freeing space from /dev/shm, you can go in there and `rm` what's unneeded17:34
sdezielfoo: so the box has ~2G of RAM hence the ~1G-ish /dev/shm17:34
foosdeziel: can I rm * ? 17:34
foo/dev/shm# ls|wc -l17:34
foo25387617:34
sdezielfoo: it's your server/your files, you know better than I do what's of value ;)17:34
foosdeziel: there is a ton of random filenames... no idea what these are :)17:35
fooWould a reboot reset this 17:35
foo?17:35
fooLikely.17:35
sdezielfoo: yes because /dev/shm is a tmpfs so it won't persist through a reboot17:35
foosdeziel: if a reboot would reset that, I'm likely fine to rm * , agree?17:35
sdezielfoo: possibly but I don't know what put those files there17:36
foosdeziel: I just did a reboot, super appreciate your help. Haven't had something like this break in production in a long time, heh.17:37
fooyup, that fixed it17:37
sdezielfoo: good :)17:37
cokethe cleansing relief of a reboot 17:43
cokefoo: make sure you check back tomorrow to find out if your logrotate config worked 17:44
foocoke: thanks, haven't set that up yet. I got to add more space to this system, no reason to be dealing with this.17:49
fooFWIW, the gzip of the 9.2 GB log file shrunk it down to 4.6GB17:49
cokethat's not very much 17:50
fooOnly a text file FWIW17:50
cokeyea but normal log files go down way more cause they always repeat the same words 17:50
fooohh, interesting17:52
foois it a word repeat only, or is an exact line match needed? 17:52
cokeyou could try bzip2 and see if it works better 17:53
coketakes way longer but is more sophisticated than bzip 17:53
fooaha, ok, good to know. I may try that, for now, the log file is off production server and I have it locally17:54
fooWhich is likely fine, I can inspect what I need to locally17:54
cokethere is no real reason to keep 6 months old logs 17:54
foogaree17:55
fooagree*17:55
cokeespecially if here is user data in it and your users are from the EU 17:55
fooI got to set up logrotate, likely really easy... looks like I just define the block, stick the file in there, restart logrotate and we're good 17:55
foonahh, all US17:55
athosCould anyone please import php-symfony-polyfill and php-twig into git ubuntu? :)18:27
rbasakathos: done18:46
athosthanks!18:56
kanashiroathos, since you grabbed the crmsh merge for this cycle this is a bug we need to tackle: https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/197273019:14
ubottuLaunchpad bug 1972730 in crmsh (Ubuntu Jammy) "WARNING: crmadmin -S <HOST> unexpected output" [Undecided, New]19:14
kanashirowe should try to reach out to the debian maintainer to get 4.4.0 in unstable19:15
kanashiroI can do that if you want19:15
kanashiroI've been in touch with him before19:15
athoskanashiro: sounds good! thank you :)20:27

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!