小编Fjo*_*dor的帖子

使用 Prometheus 监控 Angular 前端

我目前正在使用 Prometheus 通过运行状况检查和不同的计数器来监控我的 Java 后端,效果非常好!

但是,我正在努力寻找有关如何对用 Angular (TypeScript) 编写的前端执行相同操作的信息。以前有人做过类似的事情吗?

javascript monitoring typescript prometheus angular

8
推荐指数
1
解决办法
5709
查看次数

程序卡住,管道文件描述符打开的时候不应该?

我正在创建一个可以读取命令的小shell.当我运行我的程序并输入:"cat file.txt > file2.txt"它创建文件,然后它卡在行:( if(execvp(structVariables->argv[0], argv) < 0).等待输入/输出??).如果我用ctrl + d结束程序,我可以在我的文件夹中看到文件已创建,但没有写入任何内容.(dupPipe用于处理更多命令,由于上述问题尚未使用)

if((pid = fork()) < 0)
{
        perror("fork error");
}
else if(pid > 0)        // Parent
{
        if(waitpid(pid,NULL,0) < 0)
        {
                perror("waitpid error");
        }
}
else                    // Child
{    
        int flags = 0;

        if(structVariables->outfile != NULL)
        {
                flags = 1;      // Write
                redirect(structVariables->outfile, flags, STDOUT_FILENO);
        }
        if(structVariables->infile != NULL)
        {
                flags = 2;      // Read
                redirect(structVariables->infile, flags, STDIN_FILENO);
        }

        if(execvp(structVariables->argv[0], argv) < 0)
        {
                perror("execvp error");
                exit(EXIT_FAILURE);
        } …
Run Code Online (Sandbox Code Playgroud)

c pipe file-descriptor filehandle

5
推荐指数
1
解决办法
1566
查看次数

使用分配的内存将整数复制到整数

我对下面的代码有问题。

...
int anInteger;
...
//anInteger gets a value
...

int *anotherInteger;
label = (int *)malloc(sizeof(int));
strncpy(anotherInteger, anInteger, 40);
Run Code Online (Sandbox Code Playgroud)

基本上我想要做的是将值从一个整数复制到我已经为其分配内存的另一个整数。这可以在整数之间使用 strncpy 还是我需要另一个函数?

c integer memory-management copy strncpy

2
推荐指数
1
解决办法
1万
查看次数

VHDL Testbench over simulate

为什么要在VHDL中创建测试平台/测试平台?坐在和操纵模拟器中的信号以确保VHDL代码正常运行不是一样好吗?

vhdl testbed

2
推荐指数
1
解决办法
476
查看次数

虽然从shell脚本sh linux中读取

我正在读取sh shell脚本中的文件,如果条件成功,我想从文件中删除一行.

if [ -f "file.txt" ]; then
     while read line
     do
          if [*condition...*]; then
                *remove line from file*
     done
fi
Run Code Online (Sandbox Code Playgroud)

这是正确的做法吗?当我现在运行脚本时它没有输出(如果我在while循环中尝试使用echo)并且永远不会结束...

linux shell sh while-loop

0
推荐指数
1
解决办法
2137
查看次数