Clear cache of virtual machine [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I'm currently doing some database benchmarking on a virtual machine running Ubuntu 12.04. I've noticed that the second time I execute a query it runs significantly faster. This ist most likely due to the OS caching that just keeps all the data in main memory. To keep the cache from screwing up my measurements I thus want to clear it between subsequent runs.
I found the following commands to achieve this on the google:
sync;echo 3 > /proc/sys/vm/drop_caches
and
sysctl -w vm.drop_caches=3
which all yield in a permission denied error even when I'm logged in as root. It seems like it is just not possible to clear the system's cache from the guest system. I guess this is because it uses the hosts cache. As I don't have access to the host I have to find a workaround. Currently I have two ideas.
First idea is to reboot the machine between runs as this clears the cache. As I want to perform a couple dozen runs I really need to automate this. So I could put a program into autostart let it perform a query and reboot and continue with the next query on the next startup. Feels like writing a virus though.
Second idea is to just flood the memory with other data. As my machine has quite a bit of RAM i would e.g. generate some large file of random data an just read it into /dev/null.
So finally my question is, has anyone a better idea to clear the cache, or maybe avoid the usage of the cache all together? Or has anyone some suggestions on how to implement one of my two ideas easily?
Thank you very much in advance,
Antigo

Related

Full CPU and Memory hijacking virus attack [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 days ago.
Improve this question
I am experiencing a serious issue with my server system. It appears to be under continuous attack by a virus or similar malicious program. I am hoping that someone can offer advice on how to resolve this issue.
The following are the symptoms of the attack:
All CPUs and Memory are being used at 100% capacity by programs that are running from the root user account. These programs have names like "/8912348071fc".
Anydesk is getting installed and running on the server, even though we have uninstalled it many times. It keeps reappearing.
A background search code is running that is trying to find files containing passwords in VNC directories. The code is running with the following command:
/bin/sh -c -ls -a /*/*/*/*/.vnc/*passwd*
We have tried different measures to remove the malicious programs, but nothing seems to work. We need to remove these malicious programs from our server system.
OS: CentOS7
We tried till now:
Stopping the program by killing it
Disable and uninstall (yum remove) anydesk
Stopping malicious unknown program running from root like that

Mozilla Firefox excessively slows down my AWS EC2 Kali Linux machine to a crawl, is responsive outside of firefox being open [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 days ago.
Improve this question
My Kali machine is a t2.micro and is responsive when i ssh into it and am able to open it on VNC viewer and is responsive and all, until i open firefox and it becomes practically unresponsive/frozen, and doesnt take any input until many minutes afterwards. Ive seen answers to where i need to update firefox but it is so unresponsive, it is practically impossible. is there a way to fix it or update it through the command line when ssh-ing into it? any help would be greatly appreciated, thank you.
I just want to browse to hackthebox.com for a school assignment, and it wont even allow me to click anything after the web browser opens, it freezes up.
This is probably a resource issue as t2.micro only has 1gb of ram and firefox can hog cpu / memory resources.
I'd try a more robust ec2 instance or you can run through these troubleshooting steps firefox has.

linux terminal based desktop [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
does anybody know, if there is a desktop environment for linux-distros, that is completely based on terminals, but still is able to let the commands create windows (e.g. a browser, an email-program, multimedia, ...)?
Background is, that i want to use my old laptop again - but he is pretty slow and every little performance-saver would help a lot. Also i don't need much besides the terminal, email und a browser.
My research only brought up solutions, where the basic desktop-environment still runs in the background and though still uses system capacity.
Thanks in advance
I read about fvwm2. I also used it ( though it needs Xorg if I remember correctly ). Very minimalistic.
http://www.fvwm.org/
You must choose if you want a pure terminal (No X Server) and use apps like mutt for email and w3m for websurfing, or if you want a light desktop environment like openbox, i3wm, awesome...
You should look at MiniLinux distros, like DSL, or SliTaz
I have an old laptop which runs smoothly with SliTaz, but try and find which is best for you.

Apache SVN server requirements? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
Are there any minimum server requirements for using Apache SVN? If not, what are some general server specifications used for Apache SVN? Any information on server capacities for Apache SVN would be appreciated!
As long as your team is not extremely large, a very decent server is enough. Even a virtual server with about 1 virtual CPU and 1GB RAM running on a decent real CPU is enough. I'd say it doesn't need to be any faster than a server you'd use as a file server.
I'm using it myself on a very limited v-server and it works very well.
I have yet to find an Apache httpd configured Subversion server that's underpowered. Subversion itself doesn't take up a lot of bandwidth. I would still suggest that the server be dedicated. It isn't that Subversion sucks up a lot of power. More likely, whatever else you do will suck up too much power, and it will slow down Subversion. I was at one site that kept on piling more stuff onto the Subversion server (including database services) and then ware upset that Subversion was slow. Everything on that machine was slow.
The main concern would be bandwidth which seems to matter much more than the server itself. Also, be careful with NFS mounted disks (although Netapps seem fine).
I found this http://subversion.apache.org/faq.html#server-requirements but it's probably not enough detail.

Alternatives to "reboot" after changing crucial files in a working server? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 9 years ago.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Improve this question
Assume I have a server already functioning and providing an app to users. At one moment, I have to modify some crucial /etc/ configuration files. For example, /etc/security/limits.conf.
After I do the changes, documentation usually suggests rebooting the machine.
reboot
But this would imply that all processes in the server die, am I right? So, basically what will happen to the guys checking my app hosted on the server that I just "rebooted"? I think the service will stop for a while. Is there any other command or alternative less painful to do after changing crucial files?
I'm on CentOS & Nginx.
PD: If somebody could provide also a link to the difference between "shutdown" and "reboot" (because I found only some vague things), that would be great.
Easy part first - if you run shutdown your computer ends up being off. As in no power. As in, very difficult to fix remotely :). Reboot restarts everything.
It is fairly rare to require a reboot under linux - the only reason to reboot that I can think of is if you upgraded the kernel, if your machine is crashing really badly, or if you want to install some types of new hardware (RAM, plug-in cards etc).
Mostly, when you edit "important files in /etc", you can restart just a part of the system. For example, you might need to restart just your webserver.
There is no complete rule. Try googling "reload ". For example, googling "reload /etc/security/limits" suggests logging out, then logging back in.

Resources