Java Native Memory Tracking in GNU/linux

Java provides a Native Memory Tracking feature that enables you to monitor the memory usage of your Java application. This feature is particularly useful for identifying memory leaks and optimizing the memory usage of your application. In this post, we will discuss how to activate Native Memory Tracking for a Java jar application in Linux. Step 1: Check Java Version First, you need to check the version of Java installed on your system using the following command:...

2023-01-10

Cloining a repo and setting up as artifact

On this post I will give you an example of how to clone a repo into your pipeline and use it for other jobs. As you can read from Gitlab official documentation artifact can output an archive of files/directories. I set the following example: artifacts: paths: - <project_name> exclude: - <project_name>/.git/**/* expire_in: 60 seconds We need to call the artifacts by using “artifacts” keyboard in the pipeline, in this example paths keyboard which files/directories add into artifacts....

2022-12-20

Trigger pipelines in Gitlab

The following post is example of how to activate and use Trigger pipeline by API the official documentation over here as it mentioned is can be use “to trigger a pipeline for a specific branch or tag”; for our example I use it to activate a pipeline into specific branch. Steps: repoA will be the main one where the pipeline trigger it will be activate From repoA go to Settings-CI/CD-Pipeline triggers Click on “add trigger” copy your token From repoB that will be our caller of the repoA pipeline create a variable where you can paste the token....

2022-11-10

Creating snapshot image in Hetzner with packer

On this entry we will cover how to create an new image in Hetzner Public Cloud by using Packer, as result we willl get a snapshot and then we can generate this new instance by using the snapshot created. Tools used so far: Ansible Packer hcl2_upgrade I did not create a repo yet because it will be the first part of a personal project I’m working on, hence I will provide a couple of templates below....

2022-09-20

S3 by using random provider on Terraform

This is a piece of cake for most of you that are working on tf, I will drop this snippet code where you can create a S3 bucket with an unique name; as you know those requirements should fit in order to create the S3, hence we can use random_string, also we can use random_id, on this case I used random_string. main.tf resource "random_string" "randomz" { length = 8 lower = true special = false upper = false } Above is a resource block where its block label is random_string I defined the block body in that way in order to fit the S3’s requirements....

2022-07-24

How to switch 3053 to 53 on Gl.inet

For those who has a Gl.inet router featured with Adguard on it, you should being facing a issue at Adguard when it activated at first time, from clients list the only client listed is “localhost”, the reason it’s due dnsmasq is runing on port 53 in the other hand adguard by default on port 3053, in order to solve it you have to switch them. This entry is a forward post by the workaround explained by chao-chao from gl-inet-forum I did it and it’s working from my side, below is a little summary of the steps I did:...

2022-06-06

setup auto mount smb v1.0

In any case you still having a device that works with smb v1.0 you can use the following way in order to mount it on your Fedora host: Path: /etc/NetworkManager/dispatcher.d/smb-setup.sh #!/bin/sh -e # Script to dispatch NetworkManager events # more over: https://stackoverflow.com/questions/16848021/linux-networkmanagers-etc-networkmanager-dispatcher-d-test-script-does-not # Runs ifupdown scripts when NetworkManager fiddles with interfaces. # See NetworkManager(8) for further documentation of the dispatcher events. INF="$1" # your current interface name such as eth0, wlp4s0 and so on STA="$2" # status such as UP or DOWN # Send message to /var/log/messages logger -s "$0 called for interface named $INF with $STA ....

2022-05-27

csi interface for eks by terraform

It has been a while since my last post, I was busy these last couples of weeks; meanwhile I’ve learned how to implement a csi interface on eks (aws k8s) and it’s pretty interesting on AWS by EKS service, thus I though it can be useful this content into a post. Requirements: You will need your eks already running. I’ll point each tools, techs, etc I used on this procedure:...

2022-05-10

Ansible missing sudo

Ansible FAILED! => {"msg": "Missing sudo password"} I have a couple of ansible-playbook, from one of my endpoint device started to prompt missing sudo password due there is needed a sudoers access, thus this is one of the solutions. login by ssh to the device, where ansible can’t login. go to /etc/sudoers.d/ create a new entry eg: “023_user-nopass” add the following line “user ALL=(ALL) NOPASSWD: ALL” into the file “023_user-nopass” change the permission by using: sudo chmod 440 023_user-nopass NOTE: please change value for your normal user access -not the root one-...

2022-04-03

HelloWorld Solidity

This’s my Hello World on Solidity: // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.6 < 0.9.0; contract TaskContract { uint nextId; struct Task { uint id; string name; string description; } Task[] tasks; function createTask (string memory _name, string memory _description) public { tasks.push(Task(nextId, _name, _description)); nextId++; } function findIndex(uint _id) internal view returns (uint) { for (uint i=0;i < tasks.length; i++){ if (tasks[i].id == _id){ return i; } } revert('Task not found'); } function readTask(uint _id) public view returns (uint, string memory, string memory) { // _id ---> variable local uint index = findIndex(_id); return (tasks[index]....

2022-01-14