For that first get the process id (pid) from the below command
ps aux | grep logstash
After the collection of pid (suppose the pid = 6666) from above, use that like below to get the start time
ps -eo pid,cmd,lstart | grep 6666
For that first get the process id (pid) from the below command
ps aux | grep logstash
After the collection of pid (suppose the pid = 6666) from above, use that like below to get the start time
ps -eo pid,cmd,lstart | grep 6666
scp to factweavers
scp /var/www/html/teknion-ui.zip root@factweavers.com:~/../var/www/html
scp a file from factweavers
scp root@factweavers.com:/var/www/html/teknion-ui-new.zip /var/www/html/
Size of all the directories, files etc in the current directory in human-readable format.
du -sh *
command to know the free space in the disk:
df -h .
https://unix.stackexchange.com/a/185777
A systemd component called journald collects and manages journal entries from all parts of the system. This is basically log information from applications and the kernel. | |
**1. To see all log entries, starting at the oldest entry** | |
`journalctl` | |
**2. journal entries from the current boot** | |
`journalctl -b` |
**1. start a service** | |
`sudo systemctl start nginx.service` | |
**2. Stop a service** | |
`sudo systemctl stop nginx.service` | |
**3.Restart a service** |
network.host: 0 | |
http.port: 9233 | |
http.cors.enabled: true | |
http.cors.allow-origin: '*' |
to change the default size limit change the max_result_window parameter to a suitable value: curl -XPUT "http://localhost:9200/my_index/_settings" -d '{ "index" : { "max_result_window" : 500000 } }'
start mysql in ubuntu mysql -u root -p (after entering this, we will be asked password. For office system it is "factweavers")
list all databases in database | |
show databases; | |
create a database | |
create databaseName |
show the tables inside a database show tables;
create a table create table TableName(columndetails) eg: create table EmployeeDetails (PersonID int, LastName varchar(255), FirstName varchar(255), City varchar(255));
insert data to a table INSERT INTO EmployeeDetails (PersonID, LastName, FirstName, City) VALUES ('4005','Kallis','Jaques','Cape Town');