back soft

مطالب مرتبط با «in linux» در back soft | نویسنده: استخدام کار

Travelling time of data through TCP/IP stack (Linux)

Vote count: 0 I want to know how much time occurs from the moment I call res.send("Hello,World") in my NodeJS application till the moment IP package leaves NIC card. Is there a way to do this? Why do I want to know that? I have a server on CentOS6 serving 400 req/s. My partner who generates the requests measures my response time. Recently the request rate has increased to 800 req/s and the partner detected increase in my response time. The time from the moment my app gets request till it issues res.send() has not changed. Therefore, the hypothesis is that Linux TCP/IP stack has slowed. I want to check this hypothesis by actually observing the time needed by TCP/IP stack to process my respons...

ادامه مطلب

Linux Shared Memory Segmentation Fault

Vote count: 0 I am leaing about shared memory and have created this sample program to test things out //IPC - Shared Memory #include #include #include #include #include int main(int argc, char* argv[]) { printf("setting up shared memoryn"); key_t ipc_key; int shmid; int pid; ipc_key = ftok(".",'b'); if((shmid=shmget(ipc_key, 32, IPC_CREAT|0666))==-1) { printf("error creating shared memoryn"); exit(1); } printf("shared memory created with id %dn",shmid); //fork a child process pid = fork(); printf("fork result %dn",pid); if(pid==0) { //child process //attach the shared memory int* shm_add_child = (int*)shmat(shmid, 0,0); printf("child attached to shared mem at address %pn",(void*)shm_add_chil...

ادامه مطلب

How do I set NTFS permissions to a Linux equivalent using Bash on Windows-10?

Vote count: 0 I want to remote in to a Ubuntu server using my new and still shiny Windows 10 Bash. When I try ssh -i "... /private1.ppk" Uname@IP I get the message " WAING: UNPROTECTED PRIVATE KEY FILE!" & "Permissions 0444 for '... /private1.ppk' are too open." Wanderings around the web suggest 0600 should do it. I have already stripped back the permissions for the file private1.ppk and the folder it is in to 'read-only' for just one user. Needless to say chmod 0600 private1.ppk doesn't work. I'm not surprised because the Win & Linux ways are so different but it's worth asking in case I'm missing something ... is there a way to get my file to 0600? In the meantime it's back to PuTTY :-) ask...

ادامه مطلب

Cut last n seconds from a video in linux command line

Vote count: 0 I wonder if there is some way to cut the last N seconds of video using the command line in Linux . If not, I could use a script as well. asked 25 secs agoJ.Adler This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at fivefilters.org/content-only/faq.php#publishers.Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting....

ادامه مطلب

How to find jar does not have a given string in linux

Vote count: 0 I want to get list of jars which are not having a particular string in their classes. I used the following command for getting string "hello" matching jars. find . -iname '*.jar' -printf "unzip -c %p | grep -q 'hello' && echo %pn" | sh. So I tried by putting the following command for not getting "hello" matched jars, which is not working. find . -iname '*.jar' -printf "unzip -c %p |!( grep -q 'hello') && echo %pn" | sh asked 24 secs agojey Let's block ads!...

ادامه مطلب

How to get the return value of the shell command executed in a linux kernel module?

Vote count: 0 everyone! I want to get the retu value of the shell command "ls" in a keel module. the following is the source code of my keel module. #include #include #include #include MODULE_LICENSE("Dual BSD/GPL"); MODULE_AUTHOR("yuuyuu"); MODULE_DESCRIPTION("keel module hello"); MODULE_VERSION("1.0"); static int hello_init(void) { char * envp[] = { "HOME=/", NULL }; char * argv[] = { "/bin/ls","/home", NULL }; call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); printk(KE_ALERT "hello_init() startn"); retu 0; } static void hello_exit(void) { printk(KE_ALERT "hello_exit() startn"); } module_init(hello_init); module_exit(hello_exit); Is there anyone know how to get the output of "ls /ho...

ادامه مطلب

linux scheduling clock vs clock_task

Vote count: 0 Discovering scheduling on linux, I observed that on 'mode' keel the struct rq does have 2 members called 'clock' and 'clock_task'. Does someone knows the semantic difference between the two ? On 2 crashdump I got 3.x and 4.x this 2 members always have the same values Thanx in advance Cheers, Phi asked 1 min agoPhi Let's block ads!...

ادامه مطلب

how to measure raw pcie throughput in linux? I want to measure performance from root complex Is it possible to do so ?

Vote count: 0 I have intel ssd(Gen 3 x4) coected to root complex configured as Gen 3 x4(physical x8).I want to measure raw throughput of PCIe in arm64 linux ? I am new to DMA and memory mapping in linux. asked 2 mins agouser6458943 Let's block ads!...

ادامه مطلب

Python alternative to linux bluetooth command "rfcomm connect"

Vote count: 0 Requirement: I need to coect to a remote bluetooth device & port and send data using a device file. 1. First scan the nearest bluetooth devices 2. coect to a remote BT addr & chael and communicate using a device file (/dev/rfcomm0) I'm stuck at the second step. I'm able to do it through linux shell sudo rfcomm coect /dev/rfcomm0 00:11:22:33:44:55 1 & This works and then I open my python interpreter and communicate to the remote device using the rfcomm0 device file. But my requirement is such that the device addr could be changing. So I want to coect and release the coections through python program. I tried using python subprocess. But the problem is it retus immediately with a ...

ادامه مطلب

node.js with underscore on linux Error: Cannot > find module 'underscore'

Vote count: 0 I am using amazon linux on ec2. Used nvm to install node v4.4.5 and run my script and i have this error: Error: Caot > find module 'underscore' I tried to npm install underscore --save and npm install underscore -g. it just doesnt work. i dont know why is wrong. can someone help? server-0 (err): at Function.Module._load (module.js:276:25) server-0 (err): at Function._load (/home/ec2-user/.nvm/versions/node/v4.4.5/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21) server-0 (err): at Module.require (module.js:353:17) server-0 (err): at require (inteal/module.js:12:17) server-0 (err):at Object. (/var/server/routes/v1/auth.js:6:11) server-0 (err): at Module._compile (m...

ادامه مطلب

boost.asio - performance issue on linux

Vote count: 0 I heard asio has performance issue on OS which use epoll. In summary, when app send huge amount small package in high frequency, there are too much mutex lock unlock. I want ask: Does newest version asio patch this? If not, does one io_service per-thread alleviate this issue? asked 2 mins agojean Let's block ads!...

ادامه مطلب

Exporting Project To Linux

Vote count: 0 im trying to export this C++ SMFL Project im working on Visual Studio to a partner. But my partner runs on a Ubuntu Mate(Linux Distro). Currently when i just copy the project folder from Documents/VisualStudio2015/[PRPOJECTNAME] It dosent work for him. He describes it as "It Dosent Do Anything" - Partner . Is there a fix for this? Or are you unable to ship Visual Studio C++ Projects to partner. BTW, i am ruing a Visual Studio 2015 Enterprise. My OS Is Windows 10. asked 1 min agoJohn Doe Let's block ads!...

ادامه مطلب

[Linux Device Driver]where the probe() function's argument comes from?

Vote count: 0 I'm studying linux device driver. currently, I understand flows of device driver approximatively, but I dont know how probe() function gets its arguments. For example, here is my code and this is based on keel 3.10. static int gpio_led_probe(struct platform_device *pdev) { struct gpio_led_platform_data *pdata = pdev->dev.platform_data; struct gpio_leds_priv *priv; .... priv = gpio_leds_create_of(pdev); .... } As like this, the argument 'pdev' is using for various point of source. I'm understading when probe() called and it's role, but I caot find where the data 'pdev' comes from. thanks for read my thread, and sorry that my english is not good. asked 55 secs agoGTKoo Let's bloc...

ادامه مطلب

using write() function in C/C++ on Linux to write 70kB via UART Beaglebone Black

Vote count: 0 I'm trying to write a image via UART on Beaglebone Black. But when I use the write() function in library . int write( int handle, void *buffer, int nbyte ); Regardless of agurment nbyte in the write() function has int type, I can not transfer 70kB at once time. I displayed the number of byte which is transfered, and the result is the number of byte = 4111. length = write(fd,body.c_str(),strlen(body.c_str())); // cout...

ادامه مطلب

Capital letters for directories and file names angular/node front end on linux

Vote count: 0 I am in the process of converting a front-end angular website from .Net/IIS to a Node/Linux environment. After removing all visual studio/.net files and setting up appropriate node routes I seem to have the project working again. However, when deploying to the linux aws server I am being told that the linux(unbuntu) back-end caot handle the pascal and camel casing in my angular file names and directories. Now I need to modify all of the naming to snake casing. Is there anyway around this since I have hundreds of files I would need to rename? Is this casing issue with linux accurate? I come from a Windows background so this is new to me. Thanks! asked 2 mins agoosiris355 Let's b...

ادامه مطلب

Linux kernel driver: Finish 'completion' when device is removed

Vote count: 0 I am writing a keel driver to send/receive data with a PCI Express device. For this first version of the driver I am creating a character device interface where the user can read data using a file. Background I want to implement a blocking read where the user request data and the driver populates a user buffer. In order to block the user's read call I am using a completion structure. When the driver is loaded and the user requests a read the driver blocks as expected. If I were to finish the read then everything runs fine. Here is my problem In order to be safe, whenever the module is removed I call the 'complete_all' function just in case someone removes the module or device i...

ادامه مطلب

How to write linux grep, sed, diff sentences in a php file or in a perl file

Vote count: -1 I want to compare 2 text files using Diff, grep, and sed. First, How to write linux grep, sed, diff sentences in a php file or in a perl file? Second, What is better? writing it in PHP file or Perl file? I want to call this script from PHP file. Thank you. asked 3 mins agoAlaa Let's block ads!...

ادامه مطلب

How to align the C# label in the style of Linux booting

Vote count: 0 I am using Visual Studio 2015, developing winform program. I would like to have a C# label to make the item names in the left while the results aligned to right. Just like the booting information demonstration of some of Linux distributions as below: In Console.Write(), seems the String.Format() works while in a label, seems it does not. Is there any method to do the same thing like that? Thanks! edited 2 mins agoRowland Shaw asked 9 mins agoMamsds Let's block ads!...

ادامه مطلب

Socket programming between linux client and linux/windows server and android

Vote count: 0 I want to send data from a Linux client to a Linux/Windows server (maybe a shared host) and finally to an android application like this figure : The data can be a text or stream video or audio. What are the best technologies and languages for this scenario ? What is your suggestion ? asked 1 min agoMike Let's block ads!...

ادامه مطلب

Does gdb-multiarch is available for suse linux or it is only for ubuntu ?

Vote count: 0 I have to build a cross compiled gdb-multiarch source code for suse linux. I have found it is available only for ubuntu. can anyone help on this ? Thanks in advance. asked 3 mins agosharief Let's block ads!...

ادامه مطلب